From a3388f7a573813ef82439ae85ce1d074d67d41c6 Mon Sep 17 00:00:00 2001 From: LostLuma Date: Wed, 30 Oct 2024 13:38:43 +0100 Subject: [PATCH] Enable Forge and NeoForge modules, update Minecraft requirements --- gradle.properties | 2 +- gradle/libs.versions.toml | 6 +++--- platforms/fabric/src/main/resources/fabric.mod.json | 2 +- .../lostluma/dynamic_fps/impl/forge/DynamicFPSForgeMod.java | 6 +++--- platforms/forge/src/main/resources/META-INF/mods.toml | 2 +- .../neoforge/src/main/resources/META-INF/neoforge.mods.toml | 2 +- platforms/quilt/src/main/resources/quilt.mod.json | 2 +- settings.gradle.kts | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gradle.properties b/gradle.properties index 0678f770..64caed74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,4 @@ minecraft_version = 1.21.2 minecraft_version_min = 1.21.2 minecraft_version_max = 1.21.2 -enabled_platforms=fabric,quilt +enabled_platforms=fabric,forge,neoforge,quilt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f42f251..3fe0d4cb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,14 +1,14 @@ [versions] -minecraft = "1.21.2-rc1" +minecraft = "1.21.3" # Platform libraries fabric_loader = "0.15.10" fabric_api = "0.102.2+1.21.2" -forge = "1.21-51.0.33" +forge = "1.21.3-53.0.7" -neoforge = "21.0.143" +neoforge = "21.3.0-beta" quilt_loader = "0.25.0" diff --git a/platforms/fabric/src/main/resources/fabric.mod.json b/platforms/fabric/src/main/resources/fabric.mod.json index 2b98d051..47e5e59b 100644 --- a/platforms/fabric/src/main/resources/fabric.mod.json +++ b/platforms/fabric/src/main/resources/fabric.mod.json @@ -70,7 +70,7 @@ }, "depends": { "fabricloader": ">=0.15.10", - "minecraft": ">=1.21.2-alpha.24.33.a", + "minecraft": ">=1.21.2", "mixinextras": ">=0.3.2", "fabric-resource-loader-v0": "*", "fabric-lifecycle-events-v1": "*" diff --git a/platforms/forge/src/main/java/net/lostluma/dynamic_fps/impl/forge/DynamicFPSForgeMod.java b/platforms/forge/src/main/java/net/lostluma/dynamic_fps/impl/forge/DynamicFPSForgeMod.java index 35b24bee..db9c02bf 100644 --- a/platforms/forge/src/main/java/net/lostluma/dynamic_fps/impl/forge/DynamicFPSForgeMod.java +++ b/platforms/forge/src/main/java/net/lostluma/dynamic_fps/impl/forge/DynamicFPSForgeMod.java @@ -20,14 +20,14 @@ public class DynamicFPSForgeMod { private static final List TICK_EVENT_LISTENERS = new ArrayList<>(); - public DynamicFPSForgeMod() { + public DynamicFPSForgeMod(FMLJavaModLoadingContext context) { if (FMLLoader.getDist().isDedicatedServer()) { return; } DynamicFPSMod.init(); - ModLoadingContext.get().registerExtensionPoint( + context.registerExtensionPoint( ConfigScreenHandler.ConfigScreenFactory.class, () -> new ConfigScreenHandler.ConfigScreenFactory( (minecraft, screen) -> DynamicFPSMod.getConfigScreen(screen) @@ -37,7 +37,7 @@ public DynamicFPSForgeMod() { MinecraftForge.EVENT_BUS.addListener(this::onClientTick); // MinecraftForge.EVENT_BUS.addListener(this::renderGuiOverlay); - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::registerKeyMappings); + context.getModEventBus().addListener(this::registerKeyMappings); } /* diff --git a/platforms/forge/src/main/resources/META-INF/mods.toml b/platforms/forge/src/main/resources/META-INF/mods.toml index 2fbde7b1..6b3a1eda 100644 --- a/platforms/forge/src/main/resources/META-INF/mods.toml +++ b/platforms/forge/src/main/resources/META-INF/mods.toml @@ -85,6 +85,6 @@ file="META-INF/accesstransformer.cfg" [[dependencies.dynamic_fps]] modId = "minecraft" mandatory = true -versionRange = "[1.21.0,)" +versionRange = "[1.21.2,)" ordering = "NONE" side = "CLIENT" diff --git a/platforms/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/platforms/neoforge/src/main/resources/META-INF/neoforge.mods.toml index e6a2bbc4..5daef2be 100644 --- a/platforms/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/platforms/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -85,6 +85,6 @@ file="META-INF/accesstransformer.cfg" [[dependencies.dynamic_fps]] modId = "minecraft" mandatory = true -versionRange = "[1.21.0,)" +versionRange = "[1.21.2,)" ordering = "NONE" side = "CLIENT" diff --git a/platforms/quilt/src/main/resources/quilt.mod.json b/platforms/quilt/src/main/resources/quilt.mod.json index f6304b11..7ad45af2 100644 --- a/platforms/quilt/src/main/resources/quilt.mod.json +++ b/platforms/quilt/src/main/resources/quilt.mod.json @@ -81,7 +81,7 @@ }, { "id": "minecraft", - "versions": ">=1.21.2-alpha.24.33.a" + "versions": ">=1.21.2" }, { "id": "mixinextras", diff --git a/settings.gradle.kts b/settings.gradle.kts index 51d6c06c..34562df9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,7 +17,7 @@ includeBuild("build-logic") include(":platforms:common") include(":platforms:fabric") -// include(":platforms:forge") -// include(":platforms:neoforge") +include(":platforms:forge") +include(":platforms:neoforge") include(":platforms:quilt") include(":platforms:textile")