From 996df87cc29a4e4832eeaec0a74c06239a59b328 Mon Sep 17 00:00:00 2001 From: Jamalam Date: Thu, 24 Oct 2024 16:33:45 +0100 Subject: [PATCH] fix: resolve issue with launching on 1.21 --- CHANGELOG.md | 2 +- build.gradle | 4 ++++ fabric/build.gradle | 4 ++-- gradle.properties | 3 ++- neoforge/build.gradle | 10 +++++++--- .../src/main/resources/META-INF/neoforge.mods.toml | 4 ++-- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b4ad77..76b607f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -- Add `ClientPlayLifecycleEvents`. +- Fix issue with not being able to launch on 1.21. diff --git a/build.gradle b/build.gradle index 04b40d3..d8f2df9 100644 --- a/build.gradle +++ b/build.gradle @@ -26,6 +26,10 @@ subprojects { loom { silentMojangMappingsLicense() + + mixin { + useLegacyMixinAp = false + } } jar { diff --git a/fabric/build.gradle b/fabric/build.gradle index 3e3aa75..f7cef2a 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -97,13 +97,13 @@ publishing { processResources { filesMatching("fabric.mod.json") { expand "version": project.version, - "minecraft_version": project.minecraft_version, + "minecraft_version": project.minimum_minecraft_version, "fabric_api_version": libs.versions.fabric.api.get(), "architectury_version": libs.versions.architectury.get() } inputs.property "version", project.version - inputs.property "minecraft_version", project.minecraft_version + inputs.property "minecraft_version", project.minimum_minecraft_version inputs.property "fabric_api_version", libs.versions.fabric.api.get() inputs.property "architectury_version", libs.versions.architectury.get() } diff --git a/gradle.properties b/gradle.properties index d3d66f3..96a150b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,10 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false org.gradle.parallel=true -version=1.2.1+1.21.1 +version=1.2.2+1.21.1 minecraft_version=1.21.1 additional_minecraft_versions=1.21 +minimum_minecraft_version=1.21 branch=1.21.1 group=io.github.jamalam360 mod_name=JamLib diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 8ce455f..64f57af 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -96,12 +96,16 @@ publishing { } processResources { - filesMatching("neoforge.mods.toml") { - expand "minecraft_version": project.minecraft_version, + filesMatching("META-INF/neoforge.mods.toml") { + expand "version": project.version, + "minecraft_version": project.minimum_minecraft_version, + "neoforge_version": libs.versions.neoforge.get(), "architectury_version": libs.versions.architectury.get() } - inputs.property "minecraft_version", project.minecraft_version + inputs.property "version", project.version + inputs.property "minecraft_version", project.minimum_minecraft_version + inputs.property "neoforge_version", libs.versions.neoforge.get() inputs.property "architectury_version", libs.versions.architectury.get() } diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 1019f4f..6f06682 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -5,7 +5,7 @@ issueTrackerURL = "https://github.com/JamCoreModding/jamlib/issues" [[mods]] modId = "jamlib" -version = "${file.jarVersion}" +version = "${version}" displayName = "JamLib" displayURL = "https://github.com/JamCoreModding/jamlib" logoFile = "icon.png" @@ -15,7 +15,7 @@ description = '''The platform-agnostic library used in all of JamCore's mods''' [[dependencies.jamlib]] modId = "neoforge" type = "required" -versionRange = "[21,)" +versionRange = "[${neoforge_version},)" ordering = "NONE" side = "BOTH"