From 0fa495474b2375cadce0cbe6bdedf50a87679c54 Mon Sep 17 00:00:00 2001 From: feldenr <135638674+feldenr@users.noreply.github.com> Date: Mon, 2 Feb 2026 23:20:17 +0100 Subject: [PATCH] fix: register config and update recipe formats for 1.21.1 - Registered ModConfigs.SPEC in CustomOreGenMod to avoid IllegalStateException - Updated all recipe JSONs to use 'id' instead of 'item' in result fields - Renamed mekanism recipes folder to match 1.21.1 conventions --- .../net/mcreator/customoregen/CustomOreGenMod.java | 5 +++++ .../data/custom_ore_gen/recipe/axerecipe.json | 4 ++-- .../custom_ore_gen/recipe/diamondshardtodiamond.json | 4 ++-- .../data/custom_ore_gen/recipe/ore_biome_finder.json | 6 +++--- .../data/custom_ore_gen/recipe/pickaxecraft.json | 4 ++-- .../recipe/sculk_catalyst_diamond_shard.json | 6 +++--- .../custom_ore_gen/recipe/sharddiamondboots.json | 4 ++-- .../recipe/sharddiamondchestplate.json | 6 +++--- .../custom_ore_gen/recipe/sharddiamondhelmet.json | 6 +++--- .../custom_ore_gen/recipe/sharddiamondleggings.json | 6 +++--- .../custom_ore_gen/recipe/sharddiamondpaxel.json | 6 +++--- .../data/custom_ore_gen/recipe/shovelcraft.json | 4 ++-- .../mekanism/recipe/enriching/shard_diamond.json | 12 ++++++++++++ 13 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 src/main/resources/data/mekanism/recipe/enriching/shard_diamond.json diff --git a/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java b/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java index 0129a87b8..e0f992646 100644 --- a/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java +++ b/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java @@ -20,6 +20,9 @@ import net.mcreator.customoregen.init.CustomOreGenModTabs; import net.mcreator.customoregen.init.CustomOreGenModItems; import net.mcreator.customoregen.init.CustomOreGenModBlocks; import net.mcreator.customoregen.item.ShardDiamondArmorMaterial; +import net.mcreator.customoregen.config.ModConfigs; +import net.neoforged.fml.config.ModConfig; + import java.util.concurrent.ConcurrentLinkedQueue; import java.util.List; @@ -34,7 +37,9 @@ public class CustomOreGenMod { public CustomOreGenMod(IEventBus modEventBus, ModContainer container) { // Start of user code block mod constructor + container.registerConfig(ModConfig.Type.COMMON, ModConfigs.SPEC); // End of user code block mod constructor + NeoForge.EVENT_BUS.register(this); CustomOreGenModBlocks.REGISTRY.register(modEventBus); diff --git a/src/main/resources/data/custom_ore_gen/recipe/axerecipe.json b/src/main/resources/data/custom_ore_gen/recipe/axerecipe.json index 6de802a1c..23bbb0fd7 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/axerecipe.json +++ b/src/main/resources/data/custom_ore_gen/recipe/axerecipe.json @@ -15,7 +15,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondaxe", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondaxe" } } \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/diamondshardtodiamond.json b/src/main/resources/data/custom_ore_gen/recipe/diamondshardtodiamond.json index 8ffceddd4..5a24feeca 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/diamondshardtodiamond.json +++ b/src/main/resources/data/custom_ore_gen/recipe/diamondshardtodiamond.json @@ -12,7 +12,7 @@ } }, "result": { - "item": "minecraft:diamond", - "count": 1 + "count": 1, + "id": "minecraft:diamond" } } \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/ore_biome_finder.json b/src/main/resources/data/custom_ore_gen/recipe/ore_biome_finder.json index df6f07b05..5780a2a03 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/ore_biome_finder.json +++ b/src/main/resources/data/custom_ore_gen/recipe/ore_biome_finder.json @@ -14,7 +14,7 @@ } }, "result": { - "item": "custom_ore_gen:ore_biome_finder", - "count": 1 + "count": 1, + "id": "custom_ore_gen:ore_biome_finder" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/pickaxecraft.json b/src/main/resources/data/custom_ore_gen/recipe/pickaxecraft.json index ce86fcfb2..a61f6be50 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/pickaxecraft.json +++ b/src/main/resources/data/custom_ore_gen/recipe/pickaxecraft.json @@ -15,7 +15,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondpickaxe", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondpickaxe" } } \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sculk_catalyst_diamond_shard.json b/src/main/resources/data/custom_ore_gen/recipe/sculk_catalyst_diamond_shard.json index 44e896c9f..8353530a6 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sculk_catalyst_diamond_shard.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sculk_catalyst_diamond_shard.json @@ -18,7 +18,7 @@ } }, "result": { - "item": "minecraft:sculk_catalyst", - "count": 1 + "count": 1, + "id": "minecraft:sculk_catalyst" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondboots.json b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondboots.json index a27cf9854..4fc3b08e7 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondboots.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondboots.json @@ -11,7 +11,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondboots", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondboots" } } \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondchestplate.json b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondchestplate.json index ec936f26a..9295e3124 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondchestplate.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondchestplate.json @@ -15,7 +15,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondchestplate", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondchestplate" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondhelmet.json b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondhelmet.json index 918d4dd00..e827eed2e 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondhelmet.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondhelmet.json @@ -12,7 +12,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondhelmet", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondhelmet" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondleggings.json b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondleggings.json index f021efa65..67775072b 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondleggings.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondleggings.json @@ -15,7 +15,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondleggings", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondleggings" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondpaxel.json b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondpaxel.json index 9cdef0bbe..30eac10d4 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/sharddiamondpaxel.json +++ b/src/main/resources/data/custom_ore_gen/recipe/sharddiamondpaxel.json @@ -21,7 +21,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondpaxel", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondpaxel" } -} +} \ No newline at end of file diff --git a/src/main/resources/data/custom_ore_gen/recipe/shovelcraft.json b/src/main/resources/data/custom_ore_gen/recipe/shovelcraft.json index 2d3839063..26ba01b23 100644 --- a/src/main/resources/data/custom_ore_gen/recipe/shovelcraft.json +++ b/src/main/resources/data/custom_ore_gen/recipe/shovelcraft.json @@ -15,7 +15,7 @@ } }, "result": { - "item": "custom_ore_gen:sharddiamondshovel", - "count": 1 + "count": 1, + "id": "custom_ore_gen:sharddiamondshovel" } } \ No newline at end of file diff --git a/src/main/resources/data/mekanism/recipe/enriching/shard_diamond.json b/src/main/resources/data/mekanism/recipe/enriching/shard_diamond.json new file mode 100644 index 000000000..dda42ee08 --- /dev/null +++ b/src/main/resources/data/mekanism/recipe/enriching/shard_diamond.json @@ -0,0 +1,12 @@ +{ + "type": "mekanism:enriching", + "input": { + "ingredient": { + "tag": "forge:ores/shard_diamond" + } + }, + "output": { + "count": 2, + "id": "custom_ore_gen:diamondshard" + } +} \ No newline at end of file