diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a84354..24ec160 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,30 +1,47 @@ -# Automatically build the project and run any configured tests for every push -# and submitted pull request. This can help catch issues that only occur on -# certain platforms or Java versions, and provides a first line of defence -# against bad commits. +# Build the mod against every Minecraft variant Stonecutter is configured for. +# Each matrix job builds one variant and uploads its jar. +# Running `./gradlew build` from the root builds all four in one go. name: build on: push jobs: build: + name: build mc${{ matrix.mc }} runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + include: + - mc: '1.21' + java: '21' + - mc: '1.21.6' + java: '21' + - mc: '26.1' + java: '25' + - mc: '26.2' + java: '25' steps: - name: checkout repository uses: actions/checkout@v6 + - name: validate gradle wrapper uses: gradle/actions/wrapper-validation@v6 - - name: setup jdk + + - name: setup jdk ${{ matrix.java }} uses: actions/setup-java@v5 with: - java-version: '25' + java-version: ${{ matrix.java }} distribution: 'microsoft' + - name: make gradle wrapper executable run: chmod +x ./gradlew - - name: build - run: ./gradlew build - - name: capture build artifacts + + - name: build :${{ matrix.mc }}:build + run: ./gradlew :${{ matrix.mc }}:build --stacktrace + + - name: upload jar uses: actions/upload-artifact@v7 with: - name: Artifacts - path: build/libs/ + name: betterhud-mc${{ matrix.mc }} + path: versions/${{ matrix.mc }}/build/libs/*.jar diff --git a/.gitignore b/.gitignore index c476faf..8c52ed7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,14 @@ bin/ run/ +# stonecutter + +versions/*/.gradle/ +versions/*/build/ +versions/*/run/ +versions/*/src/ +*.stonecutter.tmp + # java hs_err_*.log diff --git a/build.gradle b/build.gradle index d0d242b..5a0e259 100644 --- a/build.gradle +++ b/build.gradle @@ -1,85 +1,123 @@ plugins { - id 'net.fabricmc.fabric-loom' version "${loom_version}" + // Loom 1.14+ splits into two sibling plugins: + // - `net.fabricmc.fabric-loom-remap` handles obfuscated MC (1.21.x with intermediary) + // - `net.fabricmc.fabric-loom` handles unobfuscated MC (26.1+, Mojang names native) + // We declare both with `apply false` and pick the right one for the current variant. + id 'net.fabricmc.fabric-loom-remap' version "${loom_version}" apply false + id 'net.fabricmc.fabric-loom' version "${loom_version}" apply false id 'maven-publish' } -version = project.mod_version +def mcVersion = stonecutter.current.version +def isLegacy = stonecutter.eval(mcVersion, '<26') // 1.21.x family +def hasHudElementRegistry = stonecutter.eval(mcVersion, '>=1.21.6') // 1.21.6+ and 26+ + +apply plugin: isLegacy ? 'net.fabricmc.fabric-loom-remap' : 'net.fabricmc.fabric-loom' + +// Per-MC Java version (21 for 1.21.x, 25 for 26.1+). +def javaVersionInt = Integer.parseInt(project.java_version) +def javaLang = JavaVersion.toVersion(javaVersionInt) +def mixinJavaCompat = "JAVA_${javaVersionInt}" + +version = "${project.mod_version}+mc${mcVersion}" group = project.maven_group +base { + archivesName = project.archives_base_name +} + repositories { - // Add repositories to retrieve artifacts from in here. - // You should only use this when depending on other mods because - // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. - // See https://docs.gradle.org/current/userguide/declaring_repositories.html - // for more information about repositories. - - maven { url "https://maven.shedaniel.me/" } - maven { url "https://maven.terraformersmc.com/releases/" } + maven { url 'https://maven.shedaniel.me/' } + maven { url 'https://maven.terraformersmc.com/releases/' } } -configurations.configureEach { - if (name.toLowerCase().contains('annotationprocessor')) { - exclude group: 'org.ow2.asm' +// MC 26+ uses fabric-rendering-v1's transitive deps but rejects ASM coming from +// annotation processors; matches main's existing build. +if (!isLegacy) { + configurations.configureEach { + if (name.toLowerCase().contains('annotationprocessor')) { + exclude group: 'org.ow2.asm' + } } } +// Every variant declares fabric-api, modmenu, and cloth-config as runtime deps +// (not bundled). 1.21.x uses modImplementation for intermediary remapping; 26.x +// uses plain implementation against unobfuscated MC. dependencies { - // To change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" - - implementation "net.fabricmc:fabric-loader:${project.loader_version}" - implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" + if (isLegacy) { + mappings loom.officialMojangMappings() - implementation "com.terraformersmc:modmenu:${project.modmenu_version}" - implementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { - exclude(group: "net.fabricmc.fabric-api") - } + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" + modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { + exclude(group: 'net.fabricmc.fabric-api') + } + } else { + implementation "net.fabricmc:fabric-loader:${project.loader_version}" + implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" + implementation "com.terraformersmc:modmenu:${project.modmenu_version}" + implementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { + exclude(group: 'net.fabricmc.fabric-api') + } + } } processResources { - inputs.property "version", project.version - - filesMatching("fabric.mod.json") { - expand "version": inputs.properties.version + def dependsExtra = ''', + "fabric-api": "*", + "modmenu": "*", + "cloth-config2": "*"''' + + def expansion = [ + version : project.version, + minecraftReq : project.mc_dep, + loaderReq : project.loader_dep, + javaReq : ">=${javaVersionInt}", + javaCompat : mixinJavaCompat, + dependsExtra : dependsExtra + ] + inputs.properties expansion + + filesMatching('fabric.mod.json') { + expand expansion + } + filesMatching('betterhud.mixins.json') { + expand expansion } } tasks.withType(JavaCompile).configureEach { - it.options.release = 25 + it.options.release = javaVersionInt } java { - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. withSourcesJar() - - sourceCompatibility = JavaVersion.VERSION_25 - targetCompatibility = JavaVersion.VERSION_25 + sourceCompatibility = javaLang + targetCompatibility = javaLang + toolchain { + languageVersion = JavaLanguageVersion.of(javaVersionInt) + } } jar { - inputs.property "projectName", project.name - - from("LICENSE") { - rename { "${it}_${project.name}"} + def archiveName = base.archivesName.get() + from('../../LICENSE') { + rename { "${it}_${archiveName}" } } } -// configure the maven publication publishing { publications { - create("mavenJava", MavenPublication) { + create('mavenJava', MavenPublication) { + artifactId = "${project.archives_base_name}-mc${mcVersion}" from components.java } } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { - // Add repositories to publish to here. - // Notice: This block does NOT have the same function as the block in the top level. - // The repositories here will be used for publishing your artifact, not for - // retrieving dependencies. + // Add publish repos here if/when needed. } -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties index 6593c63..0ce008e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,18 @@ # Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx1G +org.gradle.jvmargs=-Xmx2G org.gradle.parallel=true # IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349 org.gradle.configuration-cache=false -# Fabric Properties -# check these on https://fabricmc.net/develop -minecraft_version=26.2 -loader_version=0.19.3 +# Acknowledge using Groovy DSL with Stonecutter (Kotlin DSL is recommended but Groovy works). +dev.kikugie.stonecutter.hard_mode=true + +# Single loom version covers all MC variants. The `fabric-loom-remap` plugin id +# handles obfuscated MC (1.21.x), while `fabric-loom` handles unobfuscated MC (26.2+). loom_version=1.17-SNAPSHOT -# Mod Properties +# Mod Properties (shared) mod_version=2.1.1 maven_group=dsns.betterhud archives_base_name=betterhud - -# Dependencies -fabric_api_version=0.154.0+26.2 -modmenu_version=18.0.0-alpha.8 -cloth_config_version=26.1.154 \ No newline at end of file diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/settings.gradle b/settings.gradle index bcb1c6e..edfa934 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,10 +4,33 @@ pluginManagement { name = 'Fabric' url = 'https://maven.fabricmc.net/' } + maven { + name = 'Stonecutter Releases' + url = 'https://maven.kikugie.dev/releases' + } + maven { + name = 'Stonecutter Snapshots' + url = 'https://maven.kikugie.dev/snapshots' + } mavenCentral() gradlePluginPortal() } } -// Should match your modid +plugins { + id 'dev.kikugie.stonecutter' version '0.9.3' +} + +stonecutter { + create(rootProject) { + // Each entry is one buildable variant. The string is both the subproject name + // and the MC version. These cover 1.21-1.21.5, 1.21.6-1.21.11, 26.1, and 26.2. + versions('1.21', '1.21.6', '26.1', '26.2') + + // vcsVersion is the variant whose form is used as the canonical (active) version + // in source. We pick 26.2 so `git diff main` stays small. + vcsVersion = '26.2' + } +} + rootProject.name = 'betterhud' diff --git a/src/main/java/dsns/betterhud/BetterHUD.java b/src/main/java/dsns/betterhud/BetterHUD.java index bbf7edb..39bd452 100644 --- a/src/main/java/dsns/betterhud/BetterHUD.java +++ b/src/main/java/dsns/betterhud/BetterHUD.java @@ -8,8 +8,16 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; +//? if >=1.21.6 { import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry; +//?} else { +/*import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; +*///?} +//? if >=26 { import net.minecraft.resources.Identifier; +//?} else if >=1.21.6 { +/*import net.minecraft.resources.ResourceLocation;*/ +//?} import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,10 +47,19 @@ public void onInitializeClient() { BetterHUDGUI betterHUDGUI = new BetterHUDGUI(); + //? if >=26 { HudElementRegistry.addLast( Identifier.fromNamespaceAndPath("betterhud", "hud"), betterHUDGUI::onHudRender ); + //?} else if >=1.21.6 { + /*HudElementRegistry.addLast( + ResourceLocation.fromNamespaceAndPath("betterhud", "hud"), + betterHUDGUI::onHudRender + );*/ + //?} else { + /*HudRenderCallback.EVENT.register(betterHUDGUI); + *///?} ClientTickEvents.START_CLIENT_TICK.register(betterHUDGUI); } } diff --git a/src/main/java/dsns/betterhud/BetterHUDGUI.java b/src/main/java/dsns/betterhud/BetterHUDGUI.java index 169db3d..50b3913 100644 --- a/src/main/java/dsns/betterhud/BetterHUDGUI.java +++ b/src/main/java/dsns/betterhud/BetterHUDGUI.java @@ -5,15 +5,28 @@ import dsns.betterhud.util.ModSettings; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import java.util.List; - -import org.joml.Matrix3x2fStack; - import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; +//? if <1.21.6 { +/*import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;*/ +//?} import net.minecraft.client.DeltaTracker; import net.minecraft.client.Minecraft; +//? if >=26 { import net.minecraft.client.gui.GuiGraphicsExtractor; +//?} else { +/*import net.minecraft.client.gui.GuiGraphics;*/ +//?} +//? if >=1.21.6 { +import org.joml.Matrix3x2fStack; +//?} else { +/*import com.mojang.blaze3d.vertex.PoseStack;*/ +//?} +//? if >=1.21.6 { public class BetterHUDGUI implements ClientTickEvents.StartTick { +//?} else { +/*public class BetterHUDGUI implements HudRenderCallback, ClientTickEvents.StartTick {*/ +//?} public static int verticalPadding = 4; public static int horizontalPadding = 4; @@ -40,25 +53,23 @@ public void onStartTick(Minecraft client) { for (BaseMod mod : BetterHUD.mods) { ModSettings modSettings = mod.getModSettings(); - if (!modSettings.getSetting("Enabled").getBooleanValue()) - continue; + if (!modSettings.getSetting("Enabled").getBooleanValue()) continue; CustomText modText = mod.onStartTick(client); - if (modText == null) - continue; + if (modText == null) continue; String orientation = modSettings - .getSetting("Orientation") - .getStringValue(); + .getSetting("Orientation") + .getStringValue(); if (modSettings.getSetting("Custom Position").getBooleanValue()) { modText.customPosition = true; modText.customX = modSettings - .getSetting("Custom X") - .getIntValue(); + .getSetting("Custom X") + .getIntValue(); modText.customY = modSettings - .getSetting("Custom Y") - .getIntValue(); + .getSetting("Custom Y") + .getIntValue(); this.customPositionText.add(modText); } else if (orientation.equals("top-left")) { this.topLeftText.add(modText); @@ -73,19 +84,25 @@ public void onStartTick(Minecraft client) { } public void onHudRender( - GuiGraphicsExtractor drawContext, - DeltaTracker tickCounter) { - if (client.getDebugOverlay().showDebugScreen()) - return; - if (client.gui.hud.isHidden()) - return; + //? if >=26 { + GuiGraphicsExtractor drawContext, + //?} else { + /*GuiGraphics drawContext,*/ + //?} + DeltaTracker tickCounter + ) { + if (client.getDebugOverlay().showDebugScreen()) return; + //? if >=26.2 { + if (client.gui.hud.isHidden()) return; + //?} else { + /*if (client.options.hideGui) return;*/ + //?} int x = horizontalMargin; int y = verticalMargin; for (CustomText text : topLeftText) { drawString(drawContext, text, x, y); - y += scaledElementHeight(text) + lineHeight; } @@ -99,11 +116,12 @@ public void onHudRender( y = verticalMargin; for (CustomText text : topRightText) { - int offset = (client.font.width(text.text) - 1) + (horizontalPadding * 2) + horizontalMargin; - + int offset = + (client.font.width(text.text) - 1) + + (horizontalPadding * 2) + + horizontalMargin; x = client.getWindow().getGuiScaledWidth() - offset; drawString(drawContext, text, x, y); - y += scaledElementHeight(text) + lineHeight; } @@ -112,7 +130,6 @@ public void onHudRender( int offset = scaledElementWidth(text) + horizontalMargin; x = client.getWindow().getGuiScaledWidth() - offset; y -= scaledElementHeight(text); - drawString(drawContext, text, x, y); y -= lineHeight; } @@ -121,8 +138,10 @@ public void onHudRender( float xPercent = text.customX / 100.0f; float yPercent = text.customY / 100.0f; - int maxX = client.getWindow().getGuiScaledWidth() - scaledElementWidth(text); - int maxY = client.getWindow().getGuiScaledHeight() - scaledElementHeight(text); + int maxX = + client.getWindow().getGuiScaledWidth() - scaledElementWidth(text); + int maxY = + client.getWindow().getGuiScaledHeight() - scaledElementHeight(text); int scaledX = (int) (xPercent * maxX); int scaledY = (int) (yPercent * maxY); @@ -132,29 +151,57 @@ public void onHudRender( } private void drawString( - GuiGraphicsExtractor drawContext, - CustomText text, - int x, - int y) { + //? if >=26 { + GuiGraphicsExtractor drawContext, + //?} else { + /*GuiGraphics drawContext,*/ + //?} + CustomText text, + int x, + int y + ) { + //? if >=1.21.6 { Matrix3x2fStack poses = drawContext.pose(); poses.pushMatrix(); poses.translate(x, y); poses.scale(text.scale, text.scale); + //?} else { + /*PoseStack poses = drawContext.pose(); + poses.pushPose(); + poses.translate(x, y, 0); + poses.scale(text.scale, text.scale, 1);*/ + //?} int w = (client.font.width(text.text) - 1) + (horizontalPadding * 2); int h = (client.font.lineHeight - 1) + (verticalPadding * 2); drawContext.fill(0, 0, w, h, text.backgroundColor); + //? if >=26 { drawContext.text( - client.font, - text.text, - horizontalPadding, - verticalPadding, - text.color, - true); - + client.font, + text.text, + horizontalPadding, + verticalPadding, + text.color, + true + ); + //?} else { + /*drawContext.drawString( + client.font, + text.text, + horizontalPadding, + verticalPadding, + text.color, + true + );*/ + //?} + + //? if >=1.21.6 { poses.popMatrix(); + //?} else { + /*poses.popPose();*/ + //?} } private int scaledElementWidth(CustomText text) { diff --git a/src/main/java/dsns/betterhud/mods/Biome.java b/src/main/java/dsns/betterhud/mods/Biome.java index 73289be..e455125 100644 --- a/src/main/java/dsns/betterhud/mods/Biome.java +++ b/src/main/java/dsns/betterhud/mods/Biome.java @@ -5,8 +5,15 @@ import dsns.betterhud.util.ModSettings; import java.util.LinkedHashMap; import java.util.Map; +//? if <26 { +/*import java.util.Optional; +*///?} import net.minecraft.client.Minecraft; +//? if >=26 { import net.minecraft.core.Holder; +//?} else { +/*import net.minecraft.resources.ResourceKey; +*///?} import net.minecraft.world.entity.player.Player; public class Biome implements BaseMod { @@ -30,11 +37,20 @@ public CustomText onStartTick(Minecraft client) { if (player == null) return null; // have to specify this because name of class is Biome + //? if >=26 { Holder biome = client.level.getBiome(player.blockPosition()); if (!biome.unwrapKey().isPresent()) return null; String biomeString = formatSnakeCase(biome.getRegisteredName().replace("minecraft:", "")); + //?} else { + /*Optional> biome = + client.level.getBiome(player.blockPosition()).unwrapKey(); + + if (!biome.isPresent()) return null; + + String biomeString = formatSnakeCase(biome.get().location().getPath()); + *///?} // used to maintain order when iterating LinkedHashMap biomeColors = new LinkedHashMap<>(); diff --git a/src/main/java/dsns/betterhud/util/CustomText.java b/src/main/java/dsns/betterhud/util/CustomText.java index 61cbe61..b35bf40 100644 --- a/src/main/java/dsns/betterhud/util/CustomText.java +++ b/src/main/java/dsns/betterhud/util/CustomText.java @@ -19,17 +19,19 @@ public CustomText(String text, int color, float scale, int backgroundColor) { public CustomText(String text, ModSettings settings) { this( - text, - settings.getSetting("Text Color").getColorValue(), - settings.getSetting("Scale").getFloatValue(), - settings.getSetting("Background Color").getColorValue()); + text, + settings.getSetting("Text Color").getColorValue(), + settings.getSetting("Scale").getFloatValue(), + settings.getSetting("Background Color").getColorValue() + ); } public CustomText(String text, int color, ModSettings settings) { this( - text, - color, - settings.getSetting("Scale").getFloatValue(), - settings.getSetting("Background Color").getColorValue()); + text, + color, + settings.getSetting("Scale").getFloatValue(), + settings.getSetting("Background Color").getColorValue() + ); } } diff --git a/src/main/java/dsns/betterhud/util/ModSettings.java b/src/main/java/dsns/betterhud/util/ModSettings.java index baa1224..97c2ce3 100644 --- a/src/main/java/dsns/betterhud/util/ModSettings.java +++ b/src/main/java/dsns/betterhud/util/ModSettings.java @@ -4,21 +4,23 @@ public class ModSettings { - private LinkedHashMap settings = new LinkedHashMap(); + private LinkedHashMap settings = new LinkedHashMap<>(); public ModSettings() { settings.put("Enabled", Setting.createBooleanSetting(true)); settings.put( - "Orientation", - Setting.createStringSetting( - "top-left", - new String[] { - "top-left", - "top-right", - "bottom-left", - "bottom-right", - })); + "Orientation", + Setting.createStringSetting( + "top-left", + new String[] { + "top-left", + "top-right", + "bottom-left", + "bottom-right", + } + ) + ); settings.put("Custom Position", Setting.createBooleanSetting(false)); settings.put("Custom X", Setting.createIntegerSetting(0, 0, 100)); @@ -26,22 +28,25 @@ public ModSettings() { settings.put("Text Color", Setting.createColorSetting(0xffffffff)); settings.put("Scale", Setting.createDoubleSetting(1.0, 0.1, 10.0)); settings.put( - "Background Color", - Setting.createColorSetting(0x88000000)); + "Background Color", + Setting.createColorSetting(0x88000000) + ); } public ModSettings(String orientation) { this(); settings.replace( - "Orientation", - Setting.createStringSetting( - orientation, - new String[] { - "top-left", - "top-right", - "bottom-left", - "bottom-right", - })); + "Orientation", + Setting.createStringSetting( + orientation, + new String[] { + "top-left", + "top-right", + "bottom-left", + "bottom-right", + } + ) + ); } public LinkedHashMap getSettings() { diff --git a/src/main/java/dsns/betterhud/util/Setting.java b/src/main/java/dsns/betterhud/util/Setting.java index 7bf08ec..51b0b3e 100644 --- a/src/main/java/dsns/betterhud/util/Setting.java +++ b/src/main/java/dsns/betterhud/util/Setting.java @@ -56,9 +56,10 @@ public static Setting createDoubleSetting( public static Setting createFloatSetting(float value, float min, float max) { return new Setting( - String.valueOf(value), - "float", - new String[] { String.valueOf(min), String.valueOf(max) }); + String.valueOf(value), + "float", + new String[] { String.valueOf(min), String.valueOf(max) } + ); } public String getType() { diff --git a/src/main/resources/betterhud.mixins.json b/src/main/resources/betterhud.mixins.json index 370eecf..c35b39c 100644 --- a/src/main/resources/betterhud.mixins.json +++ b/src/main/resources/betterhud.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "dsns.betterhud.mixin", - "compatibilityLevel": "JAVA_25", + "compatibilityLevel": "${javaCompat}", "client": [], "injectors": { "defaultRequire": 1 @@ -9,4 +9,4 @@ "overwrites": { "requireAnnotations": true } -} \ No newline at end of file +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 7b95892..6900660 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,11 +21,8 @@ "betterhud.mixins.json" ], "depends": { - "fabricloader": ">=0.19", - "minecraft": ">=26", - "java": ">=25", - "fabric-api": "*", - "modmenu": "*", - "cloth-config2": "*" + "fabricloader": "${loaderReq}", + "minecraft": "${minecraftReq}", + "java": "${javaReq}"${dependsExtra} } -} \ No newline at end of file +} diff --git a/stonecutter.gradle b/stonecutter.gradle new file mode 100644 index 0000000..11c695e --- /dev/null +++ b/stonecutter.gradle @@ -0,0 +1,11 @@ +plugins { + id 'dev.kikugie.stonecutter' +} + +// The "active" version determines which variant the source tree currently shows +// uncommented. Switch with `./gradlew "Set active version to "` (Stonecutter task). +stonecutter.active('26.2') /* [SC] DO NOT EDIT */ + +// Stonecutter 0.7+ no longer needs explicit `registerChiseled` task: running +// `./gradlew build` from the root automatically runs `build` for every version +// subproject. Per-version commands like `./gradlew :1.21:build` also work. diff --git a/versions/1.21.6/gradle.properties b/versions/1.21.6/gradle.properties new file mode 100644 index 0000000..1c59190 --- /dev/null +++ b/versions/1.21.6/gradle.properties @@ -0,0 +1,14 @@ +# Builds against MC 1.21.9 (a stable point in the 1.21.6-1.21.11 range). +# fabric.mod.json declares >=1.21.6 <1.22 so it loads on 1.21.6-1.21.11. +minecraft_version=1.21.9 +loader_version=0.17.3 +java_version=21 + +# fabric.mod.json range +mc_dep=>=1.21.6 <1.22 +loader_dep=>=0.16.10 + +# Fabric API + ecosystem (matches support/1.21.6-1.21.11 branch). +fabric_api_version=0.134.0+1.21.9 +modmenu_version=15.0.2 +cloth_config_version=19.0.147 diff --git a/versions/1.21/gradle.properties b/versions/1.21/gradle.properties new file mode 100644 index 0000000..4d2e6ac --- /dev/null +++ b/versions/1.21/gradle.properties @@ -0,0 +1,14 @@ +# Builds against MC 1.21 itself (lowest in the 1.21-1.21.5 range, for max +# backward compat). fabric.mod.json declares ~1.21 so it loads on 1.21-1.21.5. +minecraft_version=1.21 +loader_version=0.17.3 +java_version=21 + +# fabric.mod.json range +mc_dep=~1.21 +loader_dep=>=0.15.11 + +# Fabric API + ecosystem (matches support/1.21-1.21.5 branch). +fabric_api_version=0.102.0+1.21 +modmenu_version=14.0.2 +cloth_config_version=19.0.147 diff --git a/versions/26.1/gradle.properties b/versions/26.1/gradle.properties new file mode 100644 index 0000000..dfd7869 --- /dev/null +++ b/versions/26.1/gradle.properties @@ -0,0 +1,12 @@ +minecraft_version=26.1 +loader_version=0.19.2 +java_version=25 + +# fabric.mod.json range +mc_dep=>=26.1 <26.2 +loader_dep=>=0.19 + +# Fabric API + ecosystem (runtime deps, not bundled) +fabric_api_version=0.145.1+26.1 +modmenu_version=18.0.0-alpha.8 +cloth_config_version=26.1.154 diff --git a/versions/26.2/gradle.properties b/versions/26.2/gradle.properties new file mode 100644 index 0000000..d5bee7a --- /dev/null +++ b/versions/26.2/gradle.properties @@ -0,0 +1,12 @@ +minecraft_version=26.2 +loader_version=0.19.3 +java_version=25 + +# fabric.mod.json range +mc_dep=>=26.2 +loader_dep=>=0.19 + +# Fabric API + ecosystem (26.2 requires these as runtime deps, not bundled) +fabric_api_version=0.154.0+26.2 +modmenu_version=18.0.0-alpha.8 +cloth_config_version=26.1.154