From b67b62e66c40b17df055368ec705be6faab271a9 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Fri, 11 Oct 2024 13:50:31 -0400 Subject: [PATCH 1/6] upgrade from Fallen Breath's Mod Template; add 1.21.2 branch under pre3 --- build.gradle | 34 ++- common.gradle | 207 +++++++++++++----- gradle.properties | 22 +- gradle/wrapper/gradle-wrapper.jar | Bin 43504 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 26 +-- settings.json | 12 + .../mixin/Litematica/WorldUtilsMixin.java | 4 +- .../ClientPlayerEntityMixin.java | 27 ++- .../litematicin/utils/BedrockBreaker.java | 23 ++ .../eatmyvenom/litematicin/utils/Breaker.java | 6 +- .../utils/FakeAccurateBlockPlacement.java | 5 + .../litematicin/utils/InventoryUtils.java | 24 ++ .../litematicin/utils/MessageHolder.java | 4 +- .../eatmyvenom/litematicin/utils/Printer.java | 12 + .../{modid => litematica-printer}/icon.png | Bin .../assets/litematica-printer/lang/en_us.json | 3 + src/main/resources/fabric.mod.json | 8 +- .../resources/litematica-printer.mixins.json | 2 +- versions/1.19.4/gradle.properties | 7 + versions/1.20.1/gradle.properties | 7 + versions/1.20.2/gradle.properties | 7 + versions/1.20.4/gradle.properties | 7 + versions/1.20.6/gradle.properties | 7 + versions/1.21.0/gradle.properties | 7 + versions/1.21.1/gradle.properties | 7 + versions/1.21.2/gradle.properties | 22 ++ versions/mapping-1.21.2-1.21.1.txt | 0 28 files changed, 388 insertions(+), 104 deletions(-) create mode 100644 settings.json rename src/main/resources/assets/{modid => litematica-printer}/icon.png (100%) create mode 100644 src/main/resources/assets/litematica-printer/lang/en_us.json create mode 100644 versions/1.21.2/gradle.properties create mode 100644 versions/mapping-1.21.2-1.21.1.txt diff --git a/build.gradle b/build.gradle index 06f64bad..7665206f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,13 @@ plugins { - id 'com.replaymod.preprocess' version '6989e16efc' + id 'maven-publish' id 'fabric-loom' version '1.7-SNAPSHOT' apply false + + // https://github.com/ReplayMod/preprocessor + // https://github.com/Fallen-Breath/preprocessor + id 'com.replaymod.preprocess' version 'ce1aeb2b' + + // https://github.com/Fallen-Breath/yamlang + id 'me.fallenbreath.yamlang' version '1.4.0' apply false } preprocess { @@ -17,6 +24,7 @@ preprocess { def mc1206 = createNode('1.20.6', 1_20_06, 'yarn') def mc1210 = createNode('1.21.0', 1_21_00, 'yarn') def mc1211 = createNode('1.21.1', 1_21_01, 'yarn') + def mc1212 = createNode('1.21.2', 1_21_02, 'yarn') // mapping difference map // base 1194 -> 1193 -> 1192 ->1190-> 118 -> 117 -> 116 @@ -26,6 +34,7 @@ preprocess { mc1206.link(mc1204, file('versions/mapping-1.20.6-1.20.4.txt')) mc1210.link(mc1206, file('versions/mapping-1.21.0-1.20.6.txt')) mc1211.link(mc1210, file('versions/mapping-1.21.1-1.21.0.txt')) + mc1212.link(mc1211, file('versions/mapping-1.21.2-1.21.1.txt')) //mc1194.link(mc1193, file('versions/mapping-1.19.4-1.19.3.txt')) //mc1193.link(mc1192, file('versions/mapping-1.19.3-1.19.2.txt')) //mc1192.link(mc1190, file('versions/mapping-1.19.2-1.19.0.txt')) @@ -42,19 +51,24 @@ preprocess { // gradlew :1.16.5:setCoreVersion -> set coremod version to 1.16.5 tasks.register('buildAndGather') { subprojects { - dependsOn project.name + ':build' + dependsOn project.tasks.named('build').get() } doFirst { - println 'Building and gathering all subprojects' - copy { - subprojects { - def libDir = project.projectDir.toPath().resolve('build/libs') - from(libDir) { + println 'Gathering builds' + def buildLibs = { + p -> p.buildDir.toPath().resolve('libs') + } + delete fileTree(buildLibs(rootProject)) { + include '*' + } + subprojects { + copy { + from(buildLibs(project)) { include '*.jar' - exclude '*-sources.jar', '*-dev.jar' + exclude '*-dev.jar', '*-sources.jar', '*-shadow.jar' } - into 'build/libs/' - duplicatesStrategy = DuplicatesStrategy.INCLUDE + into buildLibs(rootProject) + duplicatesStrategy DuplicatesStrategy.INCLUDE } } } diff --git a/common.gradle b/common.gradle index d03ac3f8..da8959a0 100644 --- a/common.gradle +++ b/common.gradle @@ -1,37 +1,28 @@ -// common.gradle is a file that called separately by each module. -plugins { - id 'fabric-loom' version '1.7-SNAPSHOT' - id 'com.replaymod.preprocess' version '6989e16efc' -} +apply plugin: 'maven-publish' +apply plugin: 'fabric-loom' +apply plugin: 'com.replaymod.preprocess' +apply plugin: 'me.fallenbreath.yamlang' -int mcVersion = 1 +int mcVersion = project.mcVersion preprocess { mcVersion = vars.get()["MC"] as Integer tabIndentation = true } +String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json' +String LANG_DIR = 'assets/litematica-printer/lang' +JavaVersion JAVA_COMPATIBILITY if (mcVersion >= 12005) { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 -} -else if (mcVersion >= 11800) { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -else if (mcVersion >= 11700) { - sourceCompatibility = JavaVersion.VERSION_16 - targetCompatibility = JavaVersion.VERSION_16 + JAVA_COMPATIBILITY = JavaVersion.VERSION_21 +} else if (mcVersion >= 11800) { + JAVA_COMPATIBILITY = JavaVersion.VERSION_17 +} else if (mcVersion >= 11700) { + JAVA_COMPATIBILITY = JavaVersion.VERSION_16 +} else { + JAVA_COMPATIBILITY = JavaVersion.VERSION_1_8 } -else { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - - -archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}" -version = project.mod_version -group = project.maven_group +JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY repositories { mavenCentral() @@ -46,6 +37,11 @@ repositories { } } +// https://github.com/FabricMC/fabric-loader/issues/783 +configurations { + modRuntimeOnly.exclude group: 'net.fabricmc', module: 'fabric-loader' +} + dependencies { //to change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" @@ -84,51 +80,146 @@ dependencies { } //modImplementation "fi.dy.masa.litematica:litematica-fabric-${project.minecraft_version_out}:${project.litematica_version}" } - annotationProcessor "com.github.LlamaLad7:MixinExtras:0.1.1" + + // // [FEATURE] MIXIN_AUDITOR +// modRuntimeOnly 'me.fallenbreath:mixin-auditor:0.1.0' + + // dependencies +// include(modImplementation(fabricApi.module("fabric-resource-loader-v0", project.fabric_api_version))) +// include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}")) + include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}"))) +} + +loom { + def commonVmArgs = ['-Dmixin.debug.export=true', '-Dmixin.debug.countInjections=true'] + runConfigs.configureEach { + // to make sure it generates all "Minecraft Client (:subproject_name)" applications + ideConfigGenerated = true + runDir '../../run' + vmArgs commonVmArgs + } +// // [FEATURE] MIXIN_AUDITOR +// runs { +// def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true'] +// serverMixinAudit { +// server() +// vmArgs auditVmArgs +// ideConfigGenerated false +// } +// } +} + +remapJar { + remapperIsolation = true +} + +String modVersionSuffix = '' +String artifactVersion = project.mod_version +String artifactVersionSuffix = '' +// detect github action environment variables +// https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables +if (System.getenv("BUILD_RELEASE") != "true") { + String buildNumber = System.getenv("BUILD_ID") + modVersionSuffix += buildNumber != null ? ('+build.' + buildNumber) : '-SNAPSHOT' + artifactVersionSuffix = '-SNAPSHOT' // A non-release artifact is always a SNAPSHOT artifact +} +String fullModVersion = project.mod_version + modVersionSuffix +String fullProjectVersion, fullArtifactVersion + +group = project.maven_group +if (System.getenv("JITPACK") == "true") { + // move mc version into archivesBaseName, so jitpack will be able to organize archives from multiple subprojects correctly + base.archivesName = project.archives_base_name + '-mc' + project.minecraft_version + fullProjectVersion = 'v' + project.mod_version + modVersionSuffix + fullArtifactVersion = artifactVersion + artifactVersionSuffix +} else { + base.archivesName = project.archives_base_name + fullProjectVersion = 'v' + project.mod_version + '-mc' + project.minecraft_version + modVersionSuffix + fullArtifactVersion = artifactVersion + '-mc' + project.minecraft_version + artifactVersionSuffix } +version = fullProjectVersion +// See https://youtrack.jetbrains.com/issue/IDEA-296490 +// if IDEA complains about "Cannot resolve resource filtering of MatchingCopyAction" and you want to know why processResources { - inputs.property "version", project.mod_version - // {$argument} exists in src/main/resources/fabric.mod.json, then it will be replaced with the value of the argument. - filesMatching("fabric.mod.json") { - def map = [ - "version": version, - "minecraft_dependency": project.minecraft_version_out + inputs.property "id", project.mod_id + inputs.property "name", project.mod_name + inputs.property "version", fullModVersion + inputs.property "minecraft_dependency", project.minecraft_dependency + + filesMatching("fabric.mod.json") { + def valueMap = [ + "id": project.mod_id, + "name": project.mod_name, + "version": fullModVersion, + "minecraft_dependency": project.minecraft_dependency, ] - expand map - } + expand valueMap + } + + filesMatching(MIXIN_CONFIG_PATH) { + filter { s -> s.replace('{{COMPATIBILITY_LEVEL}}', "JAVA_${MIXIN_COMPATIBILITY_LEVEL.ordinal() + 1}") } + } } +// https://github.com/Fallen-Breath/yamlang +yamlang { + targetSourceSets = [sourceSets.main] + inputDir = LANG_DIR +} + +// ensure that the encoding is set to UTF-8, no matter what the system default is +// this fixes some edge cases with special characters not displaying correctly +// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html tasks.withType(JavaCompile).configureEach { - // ensure that the encoding is set to UTF-8, no matter what the system default is - // this fixes some edge cases with special characters not displaying correctly - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html - // If Javadoc is generated, this must be specified in that task too. - it.options.encoding = "UTF-8" - - if (mcVersion >= 12005) { - it.options.release = 21 - } - else if (mcVersion >= 11800) { - it.options.release = 17 - } - else if (mcVersion >= 11700) { - it.options.release = 16 - } - else { - it.options.release = 8 + options.encoding = "UTF-8" + options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked" + if (JAVA_COMPATIBILITY <= JavaVersion.VERSION_1_8) { + // suppressed "source/target value 8 is obsolete and will be removed in a future release" + options.compilerArgs << '-Xlint:-options' } } 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 = JAVA_COMPATIBILITY + targetCompatibility = JAVA_COMPATIBILITY + + // 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() } jar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}"} - } + from(rootProject.file('LICENSE')) { + rename { "${it}_${project.archives_base_name}" } + } +} + +// configure the maven publication +publishing { + publications { + mavenJava(MavenPublication) { + artifactId base.archivesName.get() + from components.java + version = fullArtifactVersion + } + } + + // select the repositories you want to publish to + repositories { + // mavenLocal() + +// // [FEATURE] FALLENS_MAVEN +// maven { +// url = fullArtifactVersion.endsWith("SNAPSHOT") ? "https://maven.fallenbreath.me/snapshots" : "https://maven.fallenbreath.me/releases" +// credentials(PasswordCredentials) { +// username = 'fallen' +// password = System.getenv("FALLENS_MAVEN_TOKEN") +// } +// authentication { +// basic(BasicAuthentication) +// } +// } + } } diff --git a/gradle.properties b/gradle.properties index e5735b68..5625142d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,20 @@ -org.gradle.jvmargs=-Xmx6G -# This is base gradle.properties file for all projects in the workspace. -# This must not contain specific configuration for any project, such as minecraft version, etc. -# Fabric Properties - loader_version=0.15.11 +# Gradle Properties + org.gradle.jvmargs=-Xmx6G + +# Fabric Basic Properties +# https://fabricmc.net/versions.html + loader_version=0.16.7 # Mod Properties - mod_version = 7.2.1 + mod_id = litematica-printer + mod_name = Litematica Printer + mod_version = 7.2.2 maven_group = aria1th.extensions archives_base_name = litematica-printer + +# Global Dependencies +# https://github.com/Fallen-Breath/conditional-mixin +# conditionalmixin_version=0.6.3 + +# https://github.com/LlamaLad7/MixinExtras + mixinextras_version=0.3.6 diff --git a/gradle/wrapper/gradle-wrapper.jar b/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ml!6%fk7U zw0LHcz8VQk(jOJ+Yu)|^|15ufl$KQd_1eUZZzj`aC%umU6F1&D5XVWce_wAe(qCSZ zpX-QF4e{EmEVN9~6%bR5U*UT{eMHfcUo`jw*u?4r2s_$`}U{?NjvEm(u&<>B|%mq$Q3weshxk z76<``8vh{+nX`@9CB6IE&z)I%IFjR^LH{s1p|eppv=x za(g_jLU|xjWMAn-V7th$f({|LG8zzIE0g?cyW;%Dmtv%C+0@xVxPE^ zyZzi9P%JAD6ynwHptuzP`Kox7*9h7XSMonCalv;Md0i9Vb-c*!f0ubfk?&T&T}AHh z4m8Bz{JllKcdNg?D^%a5MFQ;#1z|*}H^qHLzW)L}wp?2tY7RejtSh8<;Zw)QGJYUm z|MbTxyj*McKlStlT9I5XlSWtQGN&-LTr2XyNU+`490rg?LYLMRnz-@oKqT1hpCGqP zyRXt4=_Woj$%n5ee<3zhLF>5>`?m9a#xQH+Jk_+|RM8Vi;2*XbK- zEL6sCpaGPzP>k8f4Kh|##_imt#zJMB;ir|JrMPGW`rityK1vHXMLy18%qmMQAm4WZ zP)i30KR&5vs15)C+8dM66&$k~i|ZT;KR&5vs15)C+8dJ(sAmGPijyIz6_bsqKLSFH zlOd=TljEpH0>h4zA*dCTK&emy#FCRCs1=i^sZ9bFmXjf<6_X39E(XY)00000#N437 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9355b415..0aaefbca 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 0f107813..31366e9a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,5 @@ +import groovy.json.JsonSlurper + pluginManagement { repositories { maven { @@ -9,7 +11,8 @@ pluginManagement { url = "https://jitpack.io" } maven { - url "https://masa.dy.fi/maven" + name = 'Masa' + url = "https://masa.dy.fi/maven" } mavenCentral() gradlePluginPortal() @@ -19,31 +22,18 @@ pluginManagement { switch (requested.id.id) { case "com.replaymod.preprocess": { useModule("com.github.Fallen-Breath:preprocessor:${requested.version}") + break } } } } } -def versions = Arrays.asList( - //"1.16.5", - //"1.17.1", - //"1.18.2", - //"1.19.0", - //"1.19.2", - //"1.19.3", - "1.19.4", - "1.20.1", - "1.20.2", - "1.20.4", - "1.20.6", - "1.21.0", - "1.21.1" -) -for (String version : versions) { +def settings = new JsonSlurper().parseText(file('settings.json').text) +for (String version : settings.versions) { include(":$version") def proj = project(":$version") proj.projectDir = file("versions/$version") proj.buildFileName = "../../common.gradle" -} \ No newline at end of file +} diff --git a/settings.json b/settings.json new file mode 100644 index 00000000..cc7282d3 --- /dev/null +++ b/settings.json @@ -0,0 +1,12 @@ +{ + "versions": [ + "1.19.4", + "1.20.1", + "1.20.2", + "1.20.4", + "1.20.6", + "1.21.0", + "1.21.1", + "1.21.2" + ] +} \ No newline at end of file diff --git a/src/main/java/io/github/eatmyvenom/litematicin/mixin/Litematica/WorldUtilsMixin.java b/src/main/java/io/github/eatmyvenom/litematicin/mixin/Litematica/WorldUtilsMixin.java index 0bc11ceb..ab6dc38c 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/mixin/Litematica/WorldUtilsMixin.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/mixin/Litematica/WorldUtilsMixin.java @@ -50,7 +50,9 @@ private static void onDoEasyPlaceAction(MinecraftClient mc, CallbackInfoReturnab //in case of NPE, print log instead MessageHolder.sendMessageUncheckedUnique(mc.player, e.getMessage()); if (!hasSent && mc.player != null) { - //#if MC>=11900 + //#if MC>=12102 + //$$ mc.player.sendMessage(Text.of("Null pointer exception has occured, please upload log at https://github.com/aria1th/litematica-printer/issues"), false); + //#elseif MC>=11900 mc.player.sendMessage(Text.of("Null pointer exception has occured, please upload log at https://github.com/aria1th/litematica-printer/issues")); //#else //$$mc.player.sendMessage(new LiteralText("Null pointer exception has occured, please upload log at https://github.com/aria1th/litematica-printer/issues"), false); diff --git a/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java b/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java index 62066811..03c2ca53 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java @@ -48,7 +48,9 @@ private boolean canSendPacketNormally() { // if FakeAccurateBlockPlacement is active, then return false return !shouldModifyValues(); } - //#if MC>=11904 + + //#if MC>=12102 + //#elseif MC>=11904 @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 1), require = 0) //#else //$$@Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/Packet;)V", ordinal = 2), require = 0) @@ -63,11 +65,18 @@ private void onSendPacketVehicle(ClientPlayNetworkHandler clientPlayNetworkHandl this.getX(), this.hasVehicle()? -999.0D : this.getY(), this.getZ(), FakeAccurateBlockPlacement.fakeYaw, FakeAccurateBlockPlacement.fakePitch, + //#if MC>=12102 + //$$ this.isOnGround(), + //$$ false + //#else this.isOnGround() + //#endif )); } - //#if MC>=11904 + //#if MC>=12102 + //$$ @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 0), require = 0) + //#elseif MC>=11904 @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 2), require = 0) //#else //$$@Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/Packet;)V", ordinal = 3), require = 0) @@ -81,11 +90,18 @@ private void onSendPacketFull(ClientPlayNetworkHandler clientPlayNetworkHandler, this.getX(), this.hasVehicle()? -999.0D : this.getY(), this.getZ(), FakeAccurateBlockPlacement.fakeYaw, FakeAccurateBlockPlacement.fakePitch, + //#if MC>=12102 + //$$ this.isOnGround(), + //$$ false + //#else this.isOnGround() + //#endif )); } - //#if MC>=11904 + //#if MC>=12102 + //$$ @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 2), require = 0) + //#elseif MC>=11904 @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 4), require = 0) //#else //$$@Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/Packet;)V", ordinal = 5), require = 0) @@ -99,7 +115,12 @@ private void onSendPacketLookAndOnGround(ClientPlayNetworkHandler clientPlayNetw new PlayerMoveC2SPacket.LookAndOnGround( FakeAccurateBlockPlacement.fakeYaw, FakeAccurateBlockPlacement.fakePitch, + //#if MC>=12102 + //$$ this.isOnGround(), + //$$ false + //#else this.isOnGround() + //#endif ) ); } diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/BedrockBreaker.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/BedrockBreaker.java index 57681b05..f2e0159c 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/BedrockBreaker.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/BedrockBreaker.java @@ -298,7 +298,11 @@ public static ActionResult interactBlock(MinecraftClient mc, BlockHitResult hitR //#else //$$ ActionResult result = mc.interactionManager.interactBlock(mc.player, mc.player.clientWorld, Hand.MAIN_HAND, hitResult); //#endif + //#if MC>=12102 + //$$ if (PRINTER_SHOULD_SWING_HAND.getBooleanValue() && result.isAccepted() && result.equals(ActionResult.SUCCESS)) { + //#else if (PRINTER_SHOULD_SWING_HAND.getBooleanValue() && result.isAccepted() && result.shouldSwingHand()) { + //#endif mc.player.swingHand(Hand.MAIN_HAND); } return result; @@ -339,6 +343,24 @@ public static void placeViaPacketReversed(MinecraftClient mc, BlockPos pos, Dire float OriginPitch = mc.player.getPitch(); float OriginYaw = mc.player.getYaw(); //#endif + //#if MC>=12102 + //$$ if (facing == Direction.DOWN) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(OriginYaw, -90.0f, mc.player.isOnGround(), false)); + //$$ } else if (facing == Direction.UP) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(OriginYaw, 90.0f, mc.player.isOnGround(), false)); + //$$ } else if (facing == Direction.EAST) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(90.0f, OriginPitch, mc.player.isOnGround(), false)); + //$$ } else if (facing == Direction.WEST) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(-90.0f, OriginPitch, mc.player.isOnGround(), false)); + //$$ } else if (facing == Direction.NORTH) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(0.0f, OriginPitch, mc.player.isOnGround(), false)); + //$$ } else if (facing == Direction.SOUTH) { + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(180.0f, OriginPitch, mc.player.isOnGround(), false)); + //$$ } + //$$ BlockHitResult hitResult = new BlockHitResult(hitPos, facing, npos, false); + //$$ handleTweakPlacementPacket(mc, hitResult); + //$$ mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(OriginYaw, OriginPitch, mc.player.isOnGround(), false)); + //#else if (facing == Direction.DOWN) { mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(OriginYaw, -90.0f, mc.player.isOnGround())); } else if (facing == Direction.UP) { @@ -355,6 +377,7 @@ public static void placeViaPacketReversed(MinecraftClient mc, BlockPos pos, Dire BlockHitResult hitResult = new BlockHitResult(hitPos, facing, npos, false); handleTweakPlacementPacket(mc, hitResult); mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(OriginYaw, OriginPitch, mc.player.isOnGround())); + //#endif } public static void handleTweakPlacementPacket(MinecraftClient mc, BlockHitResult hitResult) { diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/Breaker.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/Breaker.java index 9b1128b3..6e862334 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/Breaker.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/Breaker.java @@ -101,7 +101,11 @@ public static float getBlockBreakingSpeed(BlockState block, MinecraftClient mc, } float f = InventoryUtils.getInventory(mc.player).main.get(slotId).getMiningSpeedMultiplier(block); if (f > 1.0F) { - //#if MC >= 12100 + //#if MC>=12102 + //$$ ItemStack itemStack = mc.player.getInventory().getMainHandStack(); + //$$ Optional> optional = mc.world.getRegistryManager().getOptionalEntry(Enchantments.EFFICIENCY); + //$$ int i = optional.map(enchantmentReference -> EnchantmentHelper.getLevel(enchantmentReference, itemStack)).orElse(0); + //#elseif MC >= 12100 //$$ ItemStack itemStack = mc.player.getInventory().getMainHandStack(); //$$ Optional> optional = mc.world.getRegistryManager().get(RegistryKeys.ENCHANTMENT).getEntry(Enchantments.EFFICIENCY); //$$ int i = optional.map(enchantmentReference -> EnchantmentHelper.getLevel(enchantmentReference, itemStack)).orElse(0); diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/FakeAccurateBlockPlacement.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/FakeAccurateBlockPlacement.java index 7ae933c3..cba73aa1 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/FakeAccurateBlockPlacement.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/FakeAccurateBlockPlacement.java @@ -185,7 +185,12 @@ public static void sendLookPacket(ClientPlayNetworkHandler networkHandler, Clien //#endif fakeYaw, fakePitch, + //#if MC>=12102 + //$$ playerEntity.isOnGround(), + //$$ false + //#else playerEntity.isOnGround() + //#endif ) ); //System.out.print(fakeYaw); diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/InventoryUtils.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/InventoryUtils.java index 2551a624..b659e896 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/InventoryUtils.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/InventoryUtils.java @@ -158,7 +158,11 @@ public static boolean isCreative(ClientPlayerEntity player) { public static boolean isToolLikeItem(Item item) { // ToolItem or FlintAndSteelItem or ShearsItem + //#if MC>=12102 + //$$ return item instanceof MiningToolItem || item instanceof FlintAndSteelItem || item instanceof ShearsItem; + //#else return item instanceof ToolItem || item instanceof FlintAndSteelItem || item instanceof ShearsItem; + //#endif } public static void decrementCount(boolean isCreative) { @@ -297,7 +301,11 @@ public static boolean areItemsExactAllowNamed(ItemStack a, ItemStack b) { if (isToolLikeItem(a.getItem()) || isToolLikeItem(b.getItem())) { return a.getItem() == b.getItem(); } + //#if MC>=12102 + //$$ else if (a.getItem() instanceof MiningToolItem || b.getItem() instanceof MiningToolItem) { + //#else else if (a.getItem() instanceof ToolItem || b.getItem() instanceof ToolItem) { + //#endif return false; // safety } //#if MC >= 12006 @@ -339,7 +347,11 @@ public static boolean canSwap(ClientPlayerEntity player, Predicate pr Inventory inv = getInventory(player); for (int i = 0; i < inv.size(); i++) { ItemStack stack = inv.getStack(i); + //#if MC>=12102 + //$$ if (stack.getItem() instanceof MiningToolItem && predicate.test(stack)) { + //#else if (stack.getItem() instanceof ToolItem && predicate.test(stack)) { + //#endif return true; } } @@ -421,7 +433,11 @@ synchronized public static ItemStack findItem(MinecraftClient client, Predicate< Inventory inv = getInventory(player); for (int i = 0; i < inv.size(); i++) { ItemStack stack = inv.getStack(i); + //#if MC>=12102 + //$$ if (stack.getItem() instanceof MiningToolItem && predicate.test(stack)) { + //#else if (stack.getItem() instanceof ToolItem && predicate.test(stack)) { + //#endif return stack; } } @@ -435,7 +451,11 @@ synchronized public static boolean swapToItem(MinecraftClient client, Predicate< public static int getSlotWithStack(ClientPlayerEntity player, ItemStack stack) { PlayerInventory inv = getInventory(player); + //#if MC>=12102 + //$$ return stack.getItem() instanceof MiningToolItem || isToolLikeItem(stack.getItem()) ? getSlotWithItem(inv, stack) :getSlotWIthStackIgnoreNbt(getInventory(player), stack); + //#else return stack.getItem() instanceof ToolItem || isToolLikeItem(stack.getItem()) ? getSlotWithItem(inv, stack) :getSlotWIthStackIgnoreNbt(getInventory(player), stack); + //#endif } public static void printAllItems(PlayerInventory inv, ItemStack stack) { @@ -472,7 +492,11 @@ public static int getSlotWIthStackIgnoreNbt(PlayerInventory inv, ItemStack stack public static int getSlotWithStack(PlayerInventory inv, ItemStack stack) { int findingStack = getSlotWIthStackIgnoreNbt(inv, stack); + //#if MC>=12102 + //$$ return stack.getItem() instanceof MiningToolItem || isToolLikeItem(stack.getItem()) ? getSlotWithItem(inv, stack) :findingStack; + //#else return stack.getItem() instanceof ToolItem || isToolLikeItem(stack.getItem()) ? getSlotWithItem(inv, stack) :findingStack; + //#endif } @SuppressWarnings("ConstantConditions") diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/MessageHolder.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/MessageHolder.java index 6258d209..3fdc07d4 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/MessageHolder.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/MessageHolder.java @@ -28,7 +28,9 @@ public static void sendPacketOrders(String string) { private static void send(String string) { final ClientPlayerEntity player = MinecraftClient.getInstance().player; - //#if MC>=11900 + //#if MC>=12102 + //$$ player.sendMessage(Text.of(string), false); + //#elseif MC>=11900 player.sendMessage(Text.of(string)); //#else //$$player.sendMessage(new LiteralText(string), false); diff --git a/src/main/java/io/github/eatmyvenom/litematicin/utils/Printer.java b/src/main/java/io/github/eatmyvenom/litematicin/utils/Printer.java index 105991bd..7057a474 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/utils/Printer.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/utils/Printer.java @@ -123,7 +123,11 @@ public static boolean canPickBlock(MinecraftClient mc, BlockState preference, Bl if (!stack.isEmpty() && stack.getItem() != Items.AIR) { PlayerInventory inv = getInventory(mc.player); if (!isCreative(mc.player)) { + //#if MC>=12102 + //$$ if (stack.getItem() instanceof MiningToolItem || stack.getItem() instanceof FlintAndSteelItem) { + //#else if (stack.getItem() instanceof ToolItem || stack.getItem() instanceof FlintAndSteelItem) { + //#endif // manually search through inventories int slot = io.github.eatmyvenom.litematicin.utils.InventoryUtils.getSlotWithItem(inv, stack); if (slot == -1) { @@ -1457,7 +1461,11 @@ else if (stateSchematic.isOf(Blocks.FARMLAND) && PRINTER_PRINT_DIRT_VARIANTS.get * @return true if the block is blocking a beacon */ private static boolean isBlockingBeacon(BlockState stateSchematic, BlockPos pos, ClientWorld world) { + //#if MC>=12102 + //$$ if(stateSchematic.isTransparent()) { + //#else if(stateSchematic.isTransparent(world, pos)) { + //#endif return false; } int minY = world.getBottomY(); @@ -1501,7 +1509,11 @@ private static boolean checkObserverOutputs(MinecraftClient mc, World world, Blo return true; } // if block behind is powerable block in client world, we have to check recursively + //#if MC>=12102 + //$$ if(!behindStateClient.isTransparent()) { + //#else if (!behindStateClient.isTransparent(world, behindPos)) { + //#endif return false; } // if block behind-down is QCable, we have to check recursively diff --git a/src/main/resources/assets/modid/icon.png b/src/main/resources/assets/litematica-printer/icon.png similarity index 100% rename from src/main/resources/assets/modid/icon.png rename to src/main/resources/assets/litematica-printer/icon.png diff --git a/src/main/resources/assets/litematica-printer/lang/en_us.json b/src/main/resources/assets/litematica-printer/lang/en_us.json new file mode 100644 index 00000000..0e0dcd23 --- /dev/null +++ b/src/main/resources/assets/litematica-printer/lang/en_us.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a2c01310..c7120612 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,9 +1,9 @@ { "schemaVersion": 1, - "id": "litematica_printer", + "id": "${id}", "version": "${version}", - "name": "Litematica Printer", + "name": "${name}", "description": "Replaces EasyPlace with a printer to make building even easier.", "authors": [ "eatmyvenom, jensvh, aria1th" @@ -14,7 +14,7 @@ }, "license": "CC0-1.0", - "icon": "assets/modid/icon.png", + "icon": "assets/litematica-printer/icon.png", "environment": "*", "entrypoints": { "main": [ @@ -26,7 +26,7 @@ ], "depends": { - "fabricloader": ">=0.15.10", + "fabricloader": ">=0.16.7", "fabric": "*", "minecraft": "${minecraft_dependency}", "litematica": "*" diff --git a/src/main/resources/litematica-printer.mixins.json b/src/main/resources/litematica-printer.mixins.json index d7f2a697..9f2f2f63 100644 --- a/src/main/resources/litematica-printer.mixins.json +++ b/src/main/resources/litematica-printer.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "io.github.eatmyvenom.litematicin.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "{{COMPATIBILITY_LEVEL}}", "plugin": "io.github.eatmyvenom.litematicin.utils.MixinConfigPlugin", "client": [ "EssentialClient.FakeLookMixin", diff --git a/versions/1.19.4/gradle.properties b/versions/1.19.4/gradle.properties index 64292887..06a6eb0c 100644 --- a/versions/1.19.4/gradle.properties +++ b/versions/1.19.4/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.76.0+1.19.4 minecraft_version_out=1.19.4 +# Fabric Mod Metadata + minecraft_dependency=1.19.x + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.19\n1.19.1\n1.19.2\n1.19.3\n1.19.4 + # Mod Properties malilib_projectid=303119 malilib_fileid=4444338 diff --git a/versions/1.20.1/gradle.properties b/versions/1.20.1/gradle.properties index 1cfdc686..13c9d9b4 100644 --- a/versions/1.20.1/gradle.properties +++ b/versions/1.20.1/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.83.1+1.20.1 minecraft_version_out =1.20.x +# Fabric Mod Metadata + minecraft_dependency=>=1.20 <=1.20.1 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.20\n1.20.1 + # Mod Properties malilib_projectid=303119 malilib_fileid=4593073 diff --git a/versions/1.20.2/gradle.properties b/versions/1.20.2/gradle.properties index 56f56c3b..5ea37831 100644 --- a/versions/1.20.2/gradle.properties +++ b/versions/1.20.2/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.90.0+1.20.2 minecraft_version_out =1.20.2 +# Fabric Mod Metadata + minecraft_dependency=1.20.2 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.20.2 + # Mod Properties malilib_projectid=303119 malilib_fileid=4788432 diff --git a/versions/1.20.4/gradle.properties b/versions/1.20.4/gradle.properties index 105f47bc..68d2ba15 100644 --- a/versions/1.20.4/gradle.properties +++ b/versions/1.20.4/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.96.11+1.20.4 minecraft_version_out =1.20.4 +# Fabric Mod Metadata + minecraft_dependency=>=1.20.3 <=1.20.4 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.20.3\n1.20.4 + # Mod Properties malilib_projectid=303119 malilib_fileid=4946328 diff --git a/versions/1.20.6/gradle.properties b/versions/1.20.6/gradle.properties index 1ac75af6..bab568c4 100644 --- a/versions/1.20.6/gradle.properties +++ b/versions/1.20.6/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.97.8+1.20.6 minecraft_version_out = 1.20.6 +# Fabric Mod Metadata + minecraft_dependency=>=1.20.5 <=1.20.6 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.20.5\n1.20.6 + # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" diff --git a/versions/1.21.0/gradle.properties b/versions/1.21.0/gradle.properties index a1dadabb..15fede29 100644 --- a/versions/1.21.0/gradle.properties +++ b/versions/1.21.0/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.100.1+1.21 minecraft_version_out = 1.21 +# Fabric Mod Metadata + minecraft_dependency=1.21 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.21 + # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" diff --git a/versions/1.21.1/gradle.properties b/versions/1.21.1/gradle.properties index 7aa092bb..cb996d18 100644 --- a/versions/1.21.1/gradle.properties +++ b/versions/1.21.1/gradle.properties @@ -5,6 +5,13 @@ fabricapi_version=0.102.1+1.21.1 minecraft_version_out = 1.21.1 +# Fabric Mod Metadata + minecraft_dependency=1.21.1 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.21.1 + # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" diff --git a/versions/1.21.2/gradle.properties b/versions/1.21.2/gradle.properties new file mode 100644 index 00000000..0da00a03 --- /dev/null +++ b/versions/1.21.2/gradle.properties @@ -0,0 +1,22 @@ +# Fabric Properties + # check these on https://fabricmc.net/use + minecraft_version=1.21.2-pre3 + yarn_mappings=1.21.2-pre3+build.1 + fabricapi_version=0.105.3+1.21.2 + minecraft_version_out = 1.21.2-pre3 + +# Fabric Mod Metadata + minecraft_dependency=1.21.2-beta.3 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.21.2-beta.3 + +# Mod Properties + # (Jitpack.io) https://github.com/sakura-ryoko/malilib + malilib_projectid = "sakura-jitpack" + malilib_fileid = 2a89f2433e + # (Jitpack.io) https://github.com/sakura-ryoko/litematica + litematica_projectid = "sakura-jitpack" + litematica_fileid = b7bd136b17 + essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/mapping-1.21.2-1.21.1.txt b/versions/mapping-1.21.2-1.21.1.txt new file mode 100644 index 00000000..e69de29b From 1d41d795e7418902c930e9673cbd7a0ad844e7b4 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Fri, 11 Oct 2024 14:33:39 -0400 Subject: [PATCH 2/6] Some cleanup --- build.gradle | 6 ------ common.gradle | 49 ++--------------------------------------------- gradle.properties | 3 --- 3 files changed, 2 insertions(+), 56 deletions(-) diff --git a/build.gradle b/build.gradle index 7665206f..2b044945 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,7 @@ plugins { id 'maven-publish' id 'fabric-loom' version '1.7-SNAPSHOT' apply false - - // https://github.com/ReplayMod/preprocessor - // https://github.com/Fallen-Breath/preprocessor id 'com.replaymod.preprocess' version 'ce1aeb2b' - - // https://github.com/Fallen-Breath/yamlang - id 'me.fallenbreath.yamlang' version '1.4.0' apply false } preprocess { diff --git a/common.gradle b/common.gradle index da8959a0..8144aff7 100644 --- a/common.gradle +++ b/common.gradle @@ -1,7 +1,6 @@ apply plugin: 'maven-publish' apply plugin: 'fabric-loom' apply plugin: 'com.replaymod.preprocess' -apply plugin: 'me.fallenbreath.yamlang' int mcVersion = project.mcVersion @@ -11,7 +10,6 @@ preprocess { } String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json' -String LANG_DIR = 'assets/litematica-printer/lang' JavaVersion JAVA_COMPATIBILITY if (mcVersion >= 12005) { JAVA_COMPATIBILITY = JavaVersion.VERSION_21 @@ -82,11 +80,8 @@ dependencies { } // // [FEATURE] MIXIN_AUDITOR -// modRuntimeOnly 'me.fallenbreath:mixin-auditor:0.1.0' - - // dependencies -// include(modImplementation(fabricApi.module("fabric-resource-loader-v0", project.fabric_api_version))) -// include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}")) + //modRuntimeOnly 'me.fallenbreath:mixin-auditor:0.1.0' + //include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}")) include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}"))) } @@ -139,8 +134,6 @@ if (System.getenv("JITPACK") == "true") { } version = fullProjectVersion -// See https://youtrack.jetbrains.com/issue/IDEA-296490 -// if IDEA complains about "Cannot resolve resource filtering of MatchingCopyAction" and you want to know why processResources { inputs.property "id", project.mod_id inputs.property "name", project.mod_name @@ -162,12 +155,6 @@ processResources { } } -// https://github.com/Fallen-Breath/yamlang -yamlang { - targetSourceSets = [sourceSets.main] - inputDir = LANG_DIR -} - // ensure that the encoding is set to UTF-8, no matter what the system default is // this fixes some edge cases with special characters not displaying correctly // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html @@ -183,10 +170,6 @@ tasks.withType(JavaCompile).configureEach { java { sourceCompatibility = JAVA_COMPATIBILITY targetCompatibility = JAVA_COMPATIBILITY - - // 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() } @@ -195,31 +178,3 @@ jar { rename { "${it}_${project.archives_base_name}" } } } - -// configure the maven publication -publishing { - publications { - mavenJava(MavenPublication) { - artifactId base.archivesName.get() - from components.java - version = fullArtifactVersion - } - } - - // select the repositories you want to publish to - repositories { - // mavenLocal() - -// // [FEATURE] FALLENS_MAVEN -// maven { -// url = fullArtifactVersion.endsWith("SNAPSHOT") ? "https://maven.fallenbreath.me/snapshots" : "https://maven.fallenbreath.me/releases" -// credentials(PasswordCredentials) { -// username = 'fallen' -// password = System.getenv("FALLENS_MAVEN_TOKEN") -// } -// authentication { -// basic(BasicAuthentication) -// } -// } - } -} diff --git a/gradle.properties b/gradle.properties index 5625142d..ccf65c54 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,6 @@ org.gradle.jvmargs=-Xmx6G # Fabric Basic Properties -# https://fabricmc.net/versions.html loader_version=0.16.7 # Mod Properties @@ -15,6 +14,4 @@ # Global Dependencies # https://github.com/Fallen-Breath/conditional-mixin # conditionalmixin_version=0.6.3 - -# https://github.com/LlamaLad7/MixinExtras mixinextras_version=0.3.6 From 4a74ec68c26f27526e54bfb899ec604e034602ab Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Wed, 23 Oct 2024 01:39:34 -0400 Subject: [PATCH 3/6] Update 1.21.2 releases, gradle, and loom. --- build.gradle | 2 +- common.gradle | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- versions/1.21.2/gradle.properties | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 2b044945..b0e59519 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'maven-publish' - id 'fabric-loom' version '1.7-SNAPSHOT' apply false + id 'fabric-loom' version '1.8-SNAPSHOT' apply false id 'com.replaymod.preprocess' version 'ce1aeb2b' } diff --git a/common.gradle b/common.gradle index 8144aff7..04e6881d 100644 --- a/common.gradle +++ b/common.gradle @@ -104,9 +104,9 @@ loom { // } } -remapJar { - remapperIsolation = true -} +//remapJar { + //remapperIsolation = true +//} String modVersionSuffix = '' String artifactVersion = project.mod_version diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0aaefbca..df97d72b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/versions/1.21.2/gradle.properties b/versions/1.21.2/gradle.properties index 0da00a03..fdd31c28 100644 --- a/versions/1.21.2/gradle.properties +++ b/versions/1.21.2/gradle.properties @@ -1,22 +1,22 @@ # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.21.2-pre3 - yarn_mappings=1.21.2-pre3+build.1 - fabricapi_version=0.105.3+1.21.2 - minecraft_version_out = 1.21.2-pre3 + minecraft_version=1.21.2 + yarn_mappings=1.21.2+build.1 + fabricapi_version=0.106.1+1.21.2 + minecraft_version_out = 1.21.2 # Fabric Mod Metadata - minecraft_dependency=1.21.2-beta.3 + minecraft_dependency=1.21.2 # Build Information # The target mc versions for the mod during mod publishing, separated with \n - game_versions=1.21.2-beta.3 + game_versions=1.21.2 # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 2a89f2433e + malilib_fileid = cedafa9370 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = b7bd136b17 + litematica_fileid = ee96b722e7 essentialclient_filename = essential-client-1.20.1-1.3.6.jar From 84a7eed77031d6f55e8675da205f702e4692f7af Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Wed, 23 Oct 2024 17:39:55 -0400 Subject: [PATCH 4/6] Rename 1.21.2 to 1.21.3 --- build.gradle | 4 ++-- settings.json | 2 +- versions/{1.21.2 => 1.21.3}/gradle.properties | 16 ++++++++-------- ...21.2-1.21.1.txt => mapping-1.21.3-1.21.1.txt} | 0 4 files changed, 11 insertions(+), 11 deletions(-) rename versions/{1.21.2 => 1.21.3}/gradle.properties (63%) rename versions/{mapping-1.21.2-1.21.1.txt => mapping-1.21.3-1.21.1.txt} (100%) diff --git a/build.gradle b/build.gradle index b0e59519..11333255 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ preprocess { def mc1206 = createNode('1.20.6', 1_20_06, 'yarn') def mc1210 = createNode('1.21.0', 1_21_00, 'yarn') def mc1211 = createNode('1.21.1', 1_21_01, 'yarn') - def mc1212 = createNode('1.21.2', 1_21_02, 'yarn') + def mc1213 = createNode('1.21.3', 1_21_03, 'yarn') // mapping difference map // base 1194 -> 1193 -> 1192 ->1190-> 118 -> 117 -> 116 @@ -28,7 +28,7 @@ preprocess { mc1206.link(mc1204, file('versions/mapping-1.20.6-1.20.4.txt')) mc1210.link(mc1206, file('versions/mapping-1.21.0-1.20.6.txt')) mc1211.link(mc1210, file('versions/mapping-1.21.1-1.21.0.txt')) - mc1212.link(mc1211, file('versions/mapping-1.21.2-1.21.1.txt')) + mc1213.link(mc1211, file('versions/mapping-1.21.3-1.21.1.txt')) //mc1194.link(mc1193, file('versions/mapping-1.19.4-1.19.3.txt')) //mc1193.link(mc1192, file('versions/mapping-1.19.3-1.19.2.txt')) //mc1192.link(mc1190, file('versions/mapping-1.19.2-1.19.0.txt')) diff --git a/settings.json b/settings.json index cc7282d3..f817ba7b 100644 --- a/settings.json +++ b/settings.json @@ -7,6 +7,6 @@ "1.20.6", "1.21.0", "1.21.1", - "1.21.2" + "1.21.3" ] } \ No newline at end of file diff --git a/versions/1.21.2/gradle.properties b/versions/1.21.3/gradle.properties similarity index 63% rename from versions/1.21.2/gradle.properties rename to versions/1.21.3/gradle.properties index fdd31c28..8580525c 100644 --- a/versions/1.21.2/gradle.properties +++ b/versions/1.21.3/gradle.properties @@ -1,22 +1,22 @@ # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.21.2 - yarn_mappings=1.21.2+build.1 - fabricapi_version=0.106.1+1.21.2 - minecraft_version_out = 1.21.2 + minecraft_version=1.21.3 + yarn_mappings=1.21.3+build.2 + fabricapi_version=0.106.1+1.21.3 + minecraft_version_out = 1.21.3 # Fabric Mod Metadata - minecraft_dependency=1.21.2 + minecraft_dependency=>=1.21.2 <=1.21.3 # Build Information # The target mc versions for the mod during mod publishing, separated with \n - game_versions=1.21.2 + game_versions=1.21.2\n1.21.3 # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = cedafa9370 + malilib_fileid = e671048f2b # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = ee96b722e7 + litematica_fileid = c97c1e387d essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/mapping-1.21.2-1.21.1.txt b/versions/mapping-1.21.3-1.21.1.txt similarity index 100% rename from versions/mapping-1.21.2-1.21.1.txt rename to versions/mapping-1.21.3-1.21.1.txt From b139693a3404a6b8423af14843ceeee8e0e840a7 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Sun, 24 Nov 2024 11:18:22 -0500 Subject: [PATCH 5/6] Update from template (preprocessor plugin) & bump build versions of 1.21 and 1.21.3 --- build.gradle | 4 +++- common.gradle | 1 - gradle.properties | 2 +- jitpack.yml | 3 +++ versions/1.20.6/gradle.properties | 6 +++--- versions/1.21.0/gradle.properties | 4 ++-- versions/1.21.1/gradle.properties | 4 ++-- versions/1.21.3/gradle.properties | 4 ++-- 8 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 jitpack.yml diff --git a/build.gradle b/build.gradle index 11333255..5ef7c360 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,12 @@ plugins { id 'maven-publish' id 'fabric-loom' version '1.8-SNAPSHOT' apply false - id 'com.replaymod.preprocess' version 'ce1aeb2b' + id 'com.replaymod.preprocess' version '8de9ff8bf3' } preprocess { + strictExtraMappings = false + //def mc1165 = createNode('1.16.5', 1_16_05, 'yarn') //def mc1171 = createNode('1.17.1', 1_17_01, 'yarn') //def mc1182 = createNode('1.18.2', 1_18_02, 'yarn') diff --git a/common.gradle b/common.gradle index 04e6881d..2b99893f 100644 --- a/common.gradle +++ b/common.gradle @@ -6,7 +6,6 @@ int mcVersion = project.mcVersion preprocess { mcVersion = vars.get()["MC"] as Integer - tabIndentation = true } String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json' diff --git a/gradle.properties b/gradle.properties index ccf65c54..58234248 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx6G # Fabric Basic Properties - loader_version=0.16.7 + loader_version=0.16.9 # Mod Properties mod_id = litematica-printer diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..df53b48a --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,3 @@ +before_install: + - sdk install java 21.0.5-tem + - sdk use java 21.0.5-tem diff --git a/versions/1.20.6/gradle.properties b/versions/1.20.6/gradle.properties index bab568c4..1a22994b 100644 --- a/versions/1.20.6/gradle.properties +++ b/versions/1.20.6/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 795cbdd15c - # (Jitpack.io) https://github.com/sakura-ryoko/litematica + malilib_fileid = 1.20.6-0.19.1 +# (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 3b9d213f1b + litematica_fileid = 1.20.6-0.18.2 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.0/gradle.properties b/versions/1.21.0/gradle.properties index 15fede29..12872896 100644 --- a/versions/1.21.0/gradle.properties +++ b/versions/1.21.0/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 1.21-0.20.2 + malilib_fileid = 1.21-0.21.2 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 1.21-0.19.2 + litematica_fileid = 1.21-0.19.52 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.1/gradle.properties b/versions/1.21.1/gradle.properties index cb996d18..ffa0c312 100644 --- a/versions/1.21.1/gradle.properties +++ b/versions/1.21.1/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 1.21-0.20.2 + malilib_fileid = 1.21-0.21.2 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 1.21-0.19.2 + litematica_fileid = 1.21-0.19.52 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.3/gradle.properties b/versions/1.21.3/gradle.properties index 8580525c..ed277b65 100644 --- a/versions/1.21.3/gradle.properties +++ b/versions/1.21.3/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = e671048f2b + malilib_fileid = 1.21.3-0.22.0 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = c97c1e387d + litematica_fileid = 1.21.3-0.20.0 essentialclient_filename = essential-client-1.20.1-1.3.6.jar From 1865f2cd52e359d186153c3ce0aed69d8bedc236 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Tue, 3 Dec 2024 23:53:13 -0500 Subject: [PATCH 6/6] Update from template for gradle 8.11.1, loom 1.9, and Preprocessor; and add 1.21.4 / update versions for 1.21 / 1.21.3 --- build.gradle | 9 ++-- common.gradle | 62 +++++++++++------------- gradle.properties | 6 ++- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.json | 3 +- versions/1.21.0/gradle.properties | 4 +- versions/1.21.1/gradle.properties | 4 +- versions/1.21.3/gradle.properties | 4 +- versions/1.21.4/gradle.properties | 22 +++++++++ versions/mapping-1.21.4-1.21.3.txt | 0 10 files changed, 70 insertions(+), 46 deletions(-) create mode 100644 versions/1.21.4/gradle.properties create mode 100644 versions/mapping-1.21.4-1.21.3.txt diff --git a/build.gradle b/build.gradle index 5ef7c360..14f5dae9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,8 @@ plugins { - id 'maven-publish' - id 'fabric-loom' version '1.8-SNAPSHOT' apply false - id 'com.replaymod.preprocess' version '8de9ff8bf3' + id 'fabric-loom' version '1.9-SNAPSHOT' apply false + // https://github.com/ReplayMod/preprocessor + // https://github.com/Fallen-Breath/preprocessor + id 'com.replaymod.preprocess' version '9d21b334a7' } preprocess { @@ -21,6 +22,7 @@ preprocess { def mc1210 = createNode('1.21.0', 1_21_00, 'yarn') def mc1211 = createNode('1.21.1', 1_21_01, 'yarn') def mc1213 = createNode('1.21.3', 1_21_03, 'yarn') + def mc1214 = createNode('1.21.4', 1_21_04, 'yarn') // mapping difference map // base 1194 -> 1193 -> 1192 ->1190-> 118 -> 117 -> 116 @@ -31,6 +33,7 @@ preprocess { mc1210.link(mc1206, file('versions/mapping-1.21.0-1.20.6.txt')) mc1211.link(mc1210, file('versions/mapping-1.21.1-1.21.0.txt')) mc1213.link(mc1211, file('versions/mapping-1.21.3-1.21.1.txt')) + mc1214.link(mc1213, file('versions/mapping-1.21.4-1.21.3.txt')) //mc1194.link(mc1193, file('versions/mapping-1.19.4-1.19.3.txt')) //mc1193.link(mc1192, file('versions/mapping-1.19.3-1.19.2.txt')) //mc1192.link(mc1190, file('versions/mapping-1.19.2-1.19.0.txt')) diff --git a/common.gradle b/common.gradle index 2b99893f..cb93286c 100644 --- a/common.gradle +++ b/common.gradle @@ -1,25 +1,11 @@ -apply plugin: 'maven-publish' apply plugin: 'fabric-loom' apply plugin: 'com.replaymod.preprocess' int mcVersion = project.mcVersion -preprocess { - mcVersion = vars.get()["MC"] as Integer -} - -String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json' -JavaVersion JAVA_COMPATIBILITY -if (mcVersion >= 12005) { - JAVA_COMPATIBILITY = JavaVersion.VERSION_21 -} else if (mcVersion >= 11800) { - JAVA_COMPATIBILITY = JavaVersion.VERSION_17 -} else if (mcVersion >= 11700) { - JAVA_COMPATIBILITY = JavaVersion.VERSION_16 -} else { - JAVA_COMPATIBILITY = JavaVersion.VERSION_1_8 -} -JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY +//preprocess { + //mcVersion = vars.get()["MC"] as Integer +//} repositories { mavenCentral() @@ -32,6 +18,7 @@ repositories { maven { url "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" } + //maven { url 'https://maven.fallenbreath.me/releases' } } // https://github.com/FabricMC/fabric-loader/issues/783 @@ -78,12 +65,25 @@ dependencies { //modImplementation "fi.dy.masa.litematica:litematica-fabric-${project.minecraft_version_out}:${project.litematica_version}" } - // // [FEATURE] MIXIN_AUDITOR + // [FEATURE] MIXIN_AUDITOR //modRuntimeOnly 'me.fallenbreath:mixin-auditor:0.1.0' //include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}")) - include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}"))) + //include(annotationProcessor(implementation("io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}"))) } +String MIXIN_CONFIG_PATH = 'litematica-printer.mixins.json' +JavaVersion JAVA_COMPATIBILITY +if (mcVersion >= 12005) { + JAVA_COMPATIBILITY = JavaVersion.VERSION_21 +} else if (mcVersion >= 11800) { + JAVA_COMPATIBILITY = JavaVersion.VERSION_17 +} else if (mcVersion >= 11700) { + JAVA_COMPATIBILITY = JavaVersion.VERSION_16 +} else { + JAVA_COMPATIBILITY = JavaVersion.VERSION_1_8 +} +JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY + loom { def commonVmArgs = ['-Dmixin.debug.export=true', '-Dmixin.debug.countInjections=true'] runConfigs.configureEach { @@ -92,21 +92,17 @@ loom { runDir '../../run' vmArgs commonVmArgs } -// // [FEATURE] MIXIN_AUDITOR -// runs { -// def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true'] -// serverMixinAudit { -// server() -// vmArgs auditVmArgs -// ideConfigGenerated false -// } -// } + // [FEATURE] MIXIN_AUDITOR + //runs { + //def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true'] + //serverMixinAudit { + //server() + //vmArgs auditVmArgs + //ideConfigGenerated false + //} + //} } -//remapJar { - //remapperIsolation = true -//} - String modVersionSuffix = '' String artifactVersion = project.mod_version String artifactVersionSuffix = '' @@ -169,7 +165,7 @@ tasks.withType(JavaCompile).configureEach { java { sourceCompatibility = JAVA_COMPATIBILITY targetCompatibility = JAVA_COMPATIBILITY - withSourcesJar() + //withSourcesJar() } jar { diff --git a/gradle.properties b/gradle.properties index 58234248..2eff9be7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,8 @@ archives_base_name = litematica-printer # Global Dependencies -# https://github.com/Fallen-Breath/conditional-mixin -# conditionalmixin_version=0.6.3 + # https://github.com/Fallen-Breath/conditional-mixin + #conditionalmixin_version=0.6.3 + + # https://github.com/LlamaLad7/MixinExtras mixinextras_version=0.3.6 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index df97d72b..e2847c82 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.json b/settings.json index f817ba7b..e2a74870 100644 --- a/settings.json +++ b/settings.json @@ -7,6 +7,7 @@ "1.20.6", "1.21.0", "1.21.1", - "1.21.3" + "1.21.3", + "1.21.4" ] } \ No newline at end of file diff --git a/versions/1.21.0/gradle.properties b/versions/1.21.0/gradle.properties index 12872896..6218eeab 100644 --- a/versions/1.21.0/gradle.properties +++ b/versions/1.21.0/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 1.21-0.21.2 + malilib_fileid = 1.21-0.21.5-sakura.1 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 1.21-0.19.52 + litematica_fileid = 1.21-0.19.54-sakura.1 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.1/gradle.properties b/versions/1.21.1/gradle.properties index ffa0c312..1595746f 100644 --- a/versions/1.21.1/gradle.properties +++ b/versions/1.21.1/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 1.21-0.21.2 + malilib_fileid = 1.21-0.21.5-sakura.1 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 1.21-0.19.52 + litematica_fileid = 1.21-0.19.54-sakura.1 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.3/gradle.properties b/versions/1.21.3/gradle.properties index ed277b65..62eb8111 100644 --- a/versions/1.21.3/gradle.properties +++ b/versions/1.21.3/gradle.properties @@ -15,8 +15,8 @@ # Mod Properties # (Jitpack.io) https://github.com/sakura-ryoko/malilib malilib_projectid = "sakura-jitpack" - malilib_fileid = 1.21.3-0.22.0 + malilib_fileid = 1.21.3-0.22.3-sakura.1 # (Jitpack.io) https://github.com/sakura-ryoko/litematica litematica_projectid = "sakura-jitpack" - litematica_fileid = 1.21.3-0.20.0 + litematica_fileid = 1.21.3-0.20.2-sakura.1 essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/1.21.4/gradle.properties b/versions/1.21.4/gradle.properties new file mode 100644 index 00000000..4b38a77a --- /dev/null +++ b/versions/1.21.4/gradle.properties @@ -0,0 +1,22 @@ +# Fabric Properties + # check these on https://fabricmc.net/use + minecraft_version=1.21.4 + yarn_mappings=1.21.4+build.1 + fabricapi_version=0.110.5+1.21.4 + minecraft_version_out = 1.21.4 + +# Fabric Mod Metadata + minecraft_dependency=1.21.4 + +# Build Information +# The target mc versions for the mod during mod publishing, separated with \n + game_versions=1.21.4 + +# Mod Properties + # (Jitpack.io) https://github.com/sakura-ryoko/malilib + malilib_projectid = "sakura-jitpack" + malilib_fileid = 1.21.4-0.23.0-sakura.1 + # (Jitpack.io) https://github.com/sakura-ryoko/litematica + litematica_projectid = "sakura-jitpack" + litematica_fileid = 1.21.4-0.21.0-sakura.1 + essentialclient_filename = essential-client-1.20.1-1.3.6.jar diff --git a/versions/mapping-1.21.4-1.21.3.txt b/versions/mapping-1.21.4-1.21.3.txt new file mode 100644 index 00000000..e69de29b