diff --git a/common/src/main/java/github/killarexe/copper_extension/CEMod.java b/common/src/main/java/github/killarexe/copper_extension/CEMod.java index 423c21e..3680344 100644 --- a/common/src/main/java/github/killarexe/copper_extension/CEMod.java +++ b/common/src/main/java/github/killarexe/copper_extension/CEMod.java @@ -6,6 +6,6 @@ public class CEMod { public static final String MOD_ID = "copper_extension"; public static ResourceLocation id(String id) { - return new ResourceLocation(MOD_ID, id); + return ResourceLocation.fromNamespaceAndPath(MOD_ID, id); } } diff --git a/fabric/src/main/java/github/killarexe/copper_extension/fabric/registry/CEItems.java b/fabric/src/main/java/github/killarexe/copper_extension/fabric/registry/CEItems.java index d294db0..cf8b69e 100644 --- a/fabric/src/main/java/github/killarexe/copper_extension/fabric/registry/CEItems.java +++ b/fabric/src/main/java/github/killarexe/copper_extension/fabric/registry/CEItems.java @@ -18,7 +18,7 @@ public class CEItems { public static final FabricScrapableItem WAXED_COPPER_INGOT = createItem( "waxed_copper_ingot", - new FabricScrapableItem(new Item.Properties(), new ResourceLocation("minecraft", "copper_ingot")) + new FabricScrapableItem(new Item.Properties(), ResourceLocation.withDefaultNamespace("copper_ingot")) ); public static final FabricScrapableItem WAXED_EXPOSED_COPPER_INGOT = createItem( @@ -38,7 +38,7 @@ public class CEItems { public static final FabricRustableItem EXPOSED_COPPER_INGOT = createItem("exposed_copper_ingot", new FabricRustableItem( new Item.Properties(), - new ResourceLocation("minecraft", "copper_ingot"), + ResourceLocation.withDefaultNamespace( "copper_ingot"), CEMod.id("waxed_exposed_copper_ingot"), CEMod.id("weathered_copper_ingot")) ); @@ -54,7 +54,7 @@ public class CEItems { public static void register() { ITEMS.forEach((id, item) -> { - Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(CEMod.MOD_ID, id), item); + Registry.register(BuiltInRegistries.ITEM, CEMod.id(id), item); ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.INGREDIENTS).register((group) -> { group.accept(item); }); diff --git a/gradle.properties b/gradle.properties index 674cea1..ad21476 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,12 +4,12 @@ org.gradle.parallel=true org.gradle.deamon=false #Common settings -minecraft_version=1.20.6 +minecraft_version=1.21 enabled_platforms=fabric,neoforge mod_id=copper_extension mod_name=Copper Extension -mod_version=1.3.0 +mod_version=1.3.1 mod_contributors=junshengxie mod_license=CC-BY-4.0 @@ -23,13 +23,13 @@ maven_group=github.killarexe.copper_extension #Fabric settings fabric_loader_version=0.15.11 -fabric_api_version=0.99.4+1.20.6 +fabric_api_version=0.100.1+1.21 fabric_mod_sources=https://github.com/Killarexe/Copper-Extension fabric_mod_main=github.killarexe.copper_extension.fabric.CEFabric #Forge settings -neoforge_version=20.6.99-beta -neoforge_minecraft_version_range=[1.20.6,1.21) -neoforge_version_range=[20.6,) -neoforge_loader_version_range=[2,) +neoforge_version=21.0.0-beta +neoforge_minecraft_version_range=[1.21,1.22) +neoforge_version_range=[21.0.0-beta,) +neoforge_loader_version_range=[4,) neoforge_update_json_url=https://raw.githubusercontent.com/Killarexe/Copper-Extension/master/neoforge/update.json diff --git a/neoforge/src/main/java/github/killarexe/copper_extension/neoforge/registry/CEItems.java b/neoforge/src/main/java/github/killarexe/copper_extension/neoforge/registry/CEItems.java index f6fa286..c6cbb56 100644 --- a/neoforge/src/main/java/github/killarexe/copper_extension/neoforge/registry/CEItems.java +++ b/neoforge/src/main/java/github/killarexe/copper_extension/neoforge/registry/CEItems.java @@ -17,7 +17,7 @@ public class CEItems { public static final Supplier WAXED_COPPER_INGOT = ITEMS.register( "waxed_copper_ingot", - () -> new NeoForgeScrapableItem(new Item.Properties(), new ResourceLocation( "copper_ingot")) + () -> new NeoForgeScrapableItem(new Item.Properties(), ResourceLocation.withDefaultNamespace( "copper_ingot")) ); public static final Supplier WAXED_EXPOSED_COPPER_INGOT = ITEMS.register( @@ -39,7 +39,7 @@ public class CEItems { "exposed_copper_ingot", () -> new NeoForgeRustableItem( new Item.Properties(), - new ResourceLocation("copper_ingot"), + ResourceLocation.withDefaultNamespace("copper_ingot"), CEMod.id("waxed_exposed_copper_ingot"), CEMod.id("weathered_copper_ingot") )