diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 9f14ec85..ab9cb208 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -35,7 +35,7 @@ "fabricloader": ">=0.15.0", "fabric-resource-loader-v0": "*", "fabric-api": ">=0.91", - "java": ">=17" + "java": ">=21" }, "suggests": { "modmenu": "*", diff --git a/fabric/src/main/resources/fallingtree.mixins.json b/fabric/src/main/resources/fallingtree.mixins.json index f803d847..6c3db008 100644 --- a/fabric/src/main/resources/fallingtree.mixins.json +++ b/fabric/src/main/resources/fallingtree.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "fr.rakambda.fallingtree.fabric.mixin", - "compatibilityLevel": "JAVA_17", + "compatibilityLevel": "JAVA_21", "mixins": [ "AbstractBlockMixin", "LevelMixin" diff --git a/gradle.properties b/gradle.properties index bcef7537..dc96126a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ modId=fallingtree modName=FallingTree includeFabric=true includeForge=false -includeNeoForge=false +includeNeoForge=true # Repository repoUser=Rakambda repoName=FallingTree diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a22da8e0..438c6bd3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ minecraftVersion = "1.21.2" fabric-loader-version = "0.16.7" fabric-api-version = "0.106.1+1.21.2" forge-version = "1.21.1-52.0.4" -neoforge-version = "21.1.22" +neoforge-version = "21.2.0-beta" # Mod dependencies modmenu-version = "12.0.0-beta.1" @@ -19,11 +19,11 @@ clothConfigVersion = "16.0.141" fabric-loom-version = "1.8+" forge-plugin-version = "[6.0.24,6.2)" +neoforge-plugin-version = "7.0+" curse-version = "1.4.0" modrinth-version = "2.8.7" names-version = "0.51.0" git-version-plugin-version = "3.1.0" -neoforge-plugin-version = "7.0.162" [libraries] lombok = { group = "org.projectlombok", name = "lombok", version.ref = "lombok-version" } diff --git a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/FallingTreeCommonsImpl.java b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/FallingTreeCommonsImpl.java index e5e74d80..bbba92aa 100644 --- a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/FallingTreeCommonsImpl.java +++ b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/FallingTreeCommonsImpl.java @@ -212,12 +212,12 @@ public IItemStack getEmptyItemStack() { @NotNull private Optional getRegistryElement(Registry registryKey, ResourceLocation identifier){ - return registryKey.getHolder(identifier).map(Holder::value); + return registryKey.get(identifier).map(Holder::value); } @NotNull private Stream getRegistryTagContent(@NotNull Registry registry, @NotNull TagKey tag){ - return registry.getTag(tag).stream() + return registry.get(tag).stream() .flatMap(a -> a.stream().map(Holder::value)); } diff --git a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/PlayerWrapper.java b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/PlayerWrapper.java index 26b8d76f..a8e83966 100644 --- a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/PlayerWrapper.java +++ b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/PlayerWrapper.java @@ -36,7 +36,7 @@ public void sendMessage(@NotNull IComponent component, @NotNull NotificationMode } } else{ - raw.sendSystemMessage(text); + raw.displayClientMessage(text, true); } } diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index d30d5d56..28f0a380 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -17,7 +17,7 @@ file="META-INF/neoforge.accesstransformer.cfg" [[dependencies.fallingtree]] modId="neoforge" type="required" -versionRange="[21.1,)" +versionRange="[21.2,)" ordering="NONE" side="BOTH" [[dependencies.fallingtree]] @@ -29,6 +29,6 @@ side="BOTH" [[dependencies.fallingtree]] modId = "cloth-config" type="optional" -versionRange = "[15.0.0,)" +versionRange = "[16.0.0,)" ordering = "NONE" side = "CLIENT"