From aa27e4d903f9a9b71332d9e9f5f104590a992a89 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Tue, 2 Apr 2024 15:14:07 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20mob=20charm=20fragm?= =?UTF-8?q?ent=20to=20spawn=20egg=20recipe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../recipes/uncrafting/spawn_egg.json | 30 ++++++++++--------- .../crafting/FragmentToSpawnEggRecipe.java | 7 ++++- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/gradle.properties b/gradle.properties index 32e5018c..52003881 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[2,) mod_id=reliquary mod_name=Reliquary mod_license=GNU General Public License v3.0 -mod_version=2.0.39 +mod_version=2.0.40 mod_group_id=reliquary mod_authors=x3n0ph0b3, TheMike, P3pp3rF1y mod_description=Two words: magical swag. Oh, and a gun. diff --git a/src/generated/resources/data/reliquary/recipes/uncrafting/spawn_egg.json b/src/generated/resources/data/reliquary/recipes/uncrafting/spawn_egg.json index ca78ed31..974bebc9 100644 --- a/src/generated/resources/data/reliquary/recipes/uncrafting/spawn_egg.json +++ b/src/generated/resources/data/reliquary/recipes/uncrafting/spawn_egg.json @@ -4,20 +4,22 @@ "type": "reliquary:spawn_egg_enabled" } ], - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "reliquary:mob_charm_fragment" - }, - { - "item": "reliquary:mob_charm_fragment" - }, - { - "item": "minecraft:egg" + "type": "reliquary:fragment_to_spawn_egg", + "value": { + "category": "misc", + "ingredients": [ + { + "item": "reliquary:mob_charm_fragment" + }, + { + "item": "reliquary:mob_charm_fragment" + }, + { + "item": "minecraft:egg" + } + ], + "result": { + "item": "minecraft:chicken_spawn_egg" } - ], - "result": { - "item": "minecraft:chicken_spawn_egg" } } \ No newline at end of file diff --git a/src/main/java/reliquary/crafting/FragmentToSpawnEggRecipe.java b/src/main/java/reliquary/crafting/FragmentToSpawnEggRecipe.java index 1443fa0b..3927baac 100644 --- a/src/main/java/reliquary/crafting/FragmentToSpawnEggRecipe.java +++ b/src/main/java/reliquary/crafting/FragmentToSpawnEggRecipe.java @@ -9,9 +9,9 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.ShapelessRecipe; import net.minecraft.world.level.Level; +import reliquary.init.ModItems; public class FragmentToSpawnEggRecipe extends ShapelessRecipe { - public static final Serializer SERIALIZER = new Serializer(); private final ShapelessRecipe recipeDelegate; public FragmentToSpawnEggRecipe(ShapelessRecipe recipeDelegate) { @@ -30,6 +30,11 @@ public ItemStack assemble(CraftingContainer inv, RegistryAccess registryAccess) .orElse(new ItemStack(FragmentRecipeHelper.FALL_BACK_SPAWN_EGG)); } + @Override + public RecipeSerializer getSerializer() { + return ModItems.FRAGMENT_TO_SPAWN_EGG_SERIALIZER.get(); + } + @Override public boolean isSpecial() { return true;