implement Ingredient.getSerializer for custom ingredients (#5813)
This commit is contained in:
parent
f4598a97f7
commit
b8131e6e67
2 changed files with 12 additions and 0 deletions
|
@ -107,6 +107,12 @@ public class CompoundIngredient extends Ingredient
|
|||
return isSimple;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIngredientSerializer<? extends Ingredient> getSerializer()
|
||||
{
|
||||
return CraftingHelper.INGREDIENT_COMPOUND;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public Collection<Ingredient> getChildren()
|
||||
{
|
||||
|
|
|
@ -53,6 +53,12 @@ public class IngredientNBT extends Ingredient
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIngredientSerializer<? extends Ingredient> getSerializer()
|
||||
{
|
||||
return CraftingHelper.INGREDIENT_NBT;
|
||||
}
|
||||
|
||||
public static class Serializer implements IIngredientSerializer<IngredientNBT>
|
||||
{
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue