From ff1ba93d4d8909c2ac11ded6e5d82a062ca2bf62 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Fri, 14 Jun 2024 10:02:06 +1000 Subject: [PATCH] Update to Minecraft 1.21 --- Common/src/main/java/terrablender/DimensionTypeTags.java | 2 +- Common/src/main/java/terrablender/api/Region.java | 2 +- .../java/terrablender/mixin/MixinBuiltInRegistries.java | 2 +- .../java/terrablender/worldgen/DefaultNetherRegion.java | 2 +- .../terrablender/worldgen/DefaultOverworldRegion.java | 2 +- Fabric/src/main/resources/fabric.mod.json | 2 +- gradle.properties | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Common/src/main/java/terrablender/DimensionTypeTags.java b/Common/src/main/java/terrablender/DimensionTypeTags.java index 07bbe4d..b5571f8 100644 --- a/Common/src/main/java/terrablender/DimensionTypeTags.java +++ b/Common/src/main/java/terrablender/DimensionTypeTags.java @@ -13,7 +13,7 @@ public class DimensionTypeTags { public static final TagKey NETHER_REGIONS = create("nether_regions"); private static TagKey create(String id) { - return TagKey.create(Registries.DIMENSION_TYPE, new ResourceLocation(TerraBlender.MOD_ID, id)); + return TagKey.create(Registries.DIMENSION_TYPE, ResourceLocation.fromNamespaceAndPath(TerraBlender.MOD_ID, id)); } public static void init() {} diff --git a/Common/src/main/java/terrablender/api/Region.java b/Common/src/main/java/terrablender/api/Region.java index a3c4a00..17f53ce 100644 --- a/Common/src/main/java/terrablender/api/Region.java +++ b/Common/src/main/java/terrablender/api/Region.java @@ -38,7 +38,7 @@ public abstract class Region { /* A resource key used to indicate that biome selection should be deferred to Vanilla's region. */ - public static final ResourceKey DEFERRED_PLACEHOLDER = ResourceKey.create(Registries.BIOME, new ResourceLocation(TerraBlender.MOD_ID, "deferred_placeholder")); + public static final ResourceKey DEFERRED_PLACEHOLDER = ResourceKey.create(Registries.BIOME, ResourceLocation.fromNamespaceAndPath(TerraBlender.MOD_ID, "deferred_placeholder")); private final ResourceLocation name; private RegionType type; diff --git a/Common/src/main/java/terrablender/mixin/MixinBuiltInRegistries.java b/Common/src/main/java/terrablender/mixin/MixinBuiltInRegistries.java index db08dd3..ef464f1 100644 --- a/Common/src/main/java/terrablender/mixin/MixinBuiltInRegistries.java +++ b/Common/src/main/java/terrablender/mixin/MixinBuiltInRegistries.java @@ -49,7 +49,7 @@ private static void registerSimple(ResourceKey key, BuiltInRegistries.RegistryBo bootstrap.run(registry); // Run our bootstrap - return Registry.register(registry, new ResourceLocation(TerraBlender.MOD_ID, "merged"), NamespacedSurfaceRuleSource.CODEC.codec()); + return Registry.register(registry, ResourceLocation.fromNamespaceAndPath(TerraBlender.MOD_ID, "merged"), NamespacedSurfaceRuleSource.CODEC.codec()); }))); } } diff --git a/Common/src/main/java/terrablender/worldgen/DefaultNetherRegion.java b/Common/src/main/java/terrablender/worldgen/DefaultNetherRegion.java index a160d78..a5594bb 100644 --- a/Common/src/main/java/terrablender/worldgen/DefaultNetherRegion.java +++ b/Common/src/main/java/terrablender/worldgen/DefaultNetherRegion.java @@ -31,7 +31,7 @@ public class DefaultNetherRegion extends Region { - public static final ResourceLocation LOCATION = new ResourceLocation("minecraft:nether"); + public static final ResourceLocation LOCATION = ResourceLocation.fromNamespaceAndPath("minecraft", "nether"); public DefaultNetherRegion(int weight) { diff --git a/Common/src/main/java/terrablender/worldgen/DefaultOverworldRegion.java b/Common/src/main/java/terrablender/worldgen/DefaultOverworldRegion.java index 7a7e4de..c875d7d 100644 --- a/Common/src/main/java/terrablender/worldgen/DefaultOverworldRegion.java +++ b/Common/src/main/java/terrablender/worldgen/DefaultOverworldRegion.java @@ -31,7 +31,7 @@ public class DefaultOverworldRegion extends Region { - public static final ResourceLocation LOCATION = new ResourceLocation("minecraft:overworld"); + public static final ResourceLocation LOCATION = ResourceLocation.fromNamespaceAndPath("minecraft", "overworld"); public DefaultOverworldRegion(int weight) { diff --git a/Fabric/src/main/resources/fabric.mod.json b/Fabric/src/main/resources/fabric.mod.json index 20bdc92..e639c82 100644 --- a/Fabric/src/main/resources/fabric.mod.json +++ b/Fabric/src/main/resources/fabric.mod.json @@ -26,7 +26,7 @@ "depends": { "fabricloader": "*", "fabric": "*", - "minecraft": "1.20.x", + "minecraft": "1.21.x", "java": ">=17" }, "accessWidener": "terrablender.accesswidener", diff --git a/gradle.properties b/gradle.properties index cade9b2..bffdf43 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,19 +3,19 @@ group=com.github.glitchfiend release_channel=beta # Common -minecraft_version=1.20.6 +minecraft_version=1.21 common_runs_enabled=false common_client_run_name=Common Client common_server_run_name=Common Server # Forge -forge_version=50.0.5 +forge_version=51.0.4 # NeoForge -neoforge_version=20.6.24-beta +neoforge_version=21.0.0-beta # Fabric -fabric_version=0.97.8+1.20.6 +fabric_version=0.100.1+1.21 fabric_loader_version=0.15.11 # Mod options