Skip to content

Commit

Permalink
Add NeoForge 1.21.2 support (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakambda authored Oct 22, 2024
1 parent 9c83adc commit 2508a7f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"fabricloader": ">=0.15.0",
"fabric-resource-loader-v0": "*",
"fabric-api": ">=0.91",
"java": ">=17"
"java": ">=21"
},
"suggests": {
"modmenu": "*",
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fallingtree.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "fr.rakambda.fallingtree.fabric.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"mixins": [
"AbstractBlockMixin",
"LevelMixin"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ modId=fallingtree
modName=FallingTree
includeFabric=true
includeForge=false
includeNeoForge=false
includeNeoForge=true
# Repository
repoUser=Rakambda
repoName=FallingTree
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ 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"
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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ public IItemStack getEmptyItemStack() {

@NotNull
private <T> Optional<T> getRegistryElement(Registry<T> registryKey, ResourceLocation identifier){
return registryKey.getHolder(identifier).map(Holder::value);
return registryKey.get(identifier).map(Holder::value);
}

@NotNull
private <T> Stream<T> getRegistryTagContent(@NotNull Registry<T> registry, @NotNull TagKey<T> tag){
return registry.getTag(tag).stream()
return registry.get(tag).stream()
.flatMap(a -> a.stream().map(Holder::value));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void sendMessage(@NotNull IComponent component, @NotNull NotificationMode
}
}
else{
raw.sendSystemMessage(text);
raw.displayClientMessage(text, true);
}
}

Expand Down
4 changes: 2 additions & 2 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand All @@ -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"

0 comments on commit 2508a7f

Please sign in to comment.