Skip to content

Commit

Permalink
fix: 🐛 Fix mob charm fragment to spawn egg recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
P3pp3rF1y committed Apr 2, 2024
1 parent 29b0557 commit aa27e4d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit aa27e4d

Please sign in to comment.