Class CompoundIngredient
- java.lang.Object
-
- net.minecraft.item.crafting.Ingredient
-
- net.minecraftforge.common.crafting.CompoundIngredient
-
- All Implemented Interfaces:
java.util.function.Predicate<ItemStack>
public class CompoundIngredient extends Ingredient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompoundIngredient.Serializer-
Nested classes/interfaces inherited from class net.minecraft.item.crafting.Ingredient
Ingredient.IItemList, Ingredient.SingleItemList, Ingredient.TagList
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Ingredient>childrenprivate booleanisSimpleprivate it.unimi.dsi.fastutil.ints.IntListitemIdsprivate ItemStack[]stacks-
Fields inherited from class net.minecraft.item.crafting.Ingredient
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompoundIngredient(java.util.List<Ingredient> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Ingredient>getChildren()ItemStack[]getItems()IIngredientSerializer<? extends Ingredient>getSerializer()it.unimi.dsi.fastutil.ints.IntListgetStackingIds()protected voidinvalidate()booleanisEmpty()booleanisSimple()booleantest(ItemStack target)com.google.gson.JsonElementtoJson()-
Methods inherited from class net.minecraft.item.crafting.Ingredient
fromJson, fromNetwork, fromValues, invalidateAll, isVanilla, merge, of, of, of, of, toNetwork, valueFromJson
-
-
-
-
Field Detail
-
children
private java.util.List<Ingredient> children
-
stacks
private ItemStack[] stacks
-
itemIds
private it.unimi.dsi.fastutil.ints.IntList itemIds
-
isSimple
private final boolean isSimple
-
-
Constructor Detail
-
CompoundIngredient
protected CompoundIngredient(java.util.List<Ingredient> children)
-
-
Method Detail
-
getItems
@Nonnull public ItemStack[] getItems()
- Overrides:
getItemsin classIngredient
-
getStackingIds
@Nonnull public it.unimi.dsi.fastutil.ints.IntList getStackingIds()
- Overrides:
getStackingIdsin classIngredient
-
test
public boolean test(@Nullable ItemStack target)- Specified by:
testin interfacejava.util.function.Predicate<ItemStack>- Overrides:
testin classIngredient
-
invalidate
protected void invalidate()
- Overrides:
invalidatein classIngredient
-
isSimple
public boolean isSimple()
- Overrides:
isSimplein classIngredient
-
getSerializer
public IIngredientSerializer<? extends Ingredient> getSerializer()
- Overrides:
getSerializerin classIngredient
-
getChildren
@Nonnull public java.util.Collection<Ingredient> getChildren()
-
toJson
public com.google.gson.JsonElement toJson()
- Overrides:
toJsonin classIngredient
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmptyin classIngredient
-
-