public class CompoundIngredient extends Ingredient
Modifier and Type | Class and Description |
---|---|
static class |
CompoundIngredient.Serializer |
Ingredient.IItemList, Ingredient.SingleItemList, Ingredient.TagList
Modifier and Type | Field and Description |
---|---|
private java.util.List<Ingredient> |
children |
private boolean |
isSimple |
private it.unimi.dsi.fastutil.ints.IntList |
itemIds |
private ItemStack[] |
stacks |
EMPTY
Modifier | Constructor and Description |
---|---|
protected |
CompoundIngredient(java.util.List<Ingredient> children) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Ingredient> |
getChildren() |
ItemStack[] |
getMatchingStacks() |
IIngredientSerializer<? extends Ingredient> |
getSerializer() |
it.unimi.dsi.fastutil.ints.IntList |
getValidItemStacksPacked() |
protected void |
invalidate() |
boolean |
isSimple() |
com.google.gson.JsonElement |
serialize() |
boolean |
test(ItemStack target) |
deserialize, deserializeItemList, fromItemListStream, fromItems, fromStacks, fromTag, hasNoMatchingItems, invalidateAll, isVanilla, merge, read, write
private java.util.List<Ingredient> children
private ItemStack[] stacks
private it.unimi.dsi.fastutil.ints.IntList itemIds
private final boolean isSimple
protected CompoundIngredient(java.util.List<Ingredient> children)
@Nonnull public ItemStack[] getMatchingStacks()
getMatchingStacks
in class Ingredient
@Nonnull public it.unimi.dsi.fastutil.ints.IntList getValidItemStacksPacked()
getValidItemStacksPacked
in class Ingredient
public boolean test(@Nullable ItemStack target)
test
in interface java.util.function.Predicate<ItemStack>
test
in class Ingredient
protected void invalidate()
invalidate
in class Ingredient
public boolean isSimple()
isSimple
in class Ingredient
public IIngredientSerializer<? extends Ingredient> getSerializer()
getSerializer
in class Ingredient
@Nonnull public java.util.Collection<Ingredient> getChildren()
public com.google.gson.JsonElement serialize()
serialize
in class Ingredient