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 class
CompoundIngredient.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>
children
private boolean
isSimple
private it.unimi.dsi.fastutil.ints.IntList
itemIds
private ItemStack[]
stacks
-
Fields inherited from class net.minecraft.item.crafting.Ingredient
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompoundIngredient(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.IntList
getStackingIds()
protected void
invalidate()
boolean
isEmpty()
boolean
isSimple()
boolean
test(ItemStack target)
com.google.gson.JsonElement
toJson()
-
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:
getItems
in classIngredient
-
getStackingIds
@Nonnull public it.unimi.dsi.fastutil.ints.IntList getStackingIds()
- Overrides:
getStackingIds
in classIngredient
-
test
public boolean test(@Nullable ItemStack target)
- Specified by:
test
in interfacejava.util.function.Predicate<ItemStack>
- Overrides:
test
in classIngredient
-
invalidate
protected void invalidate()
- Overrides:
invalidate
in classIngredient
-
isSimple
public boolean isSimple()
- Overrides:
isSimple
in classIngredient
-
getSerializer
public IIngredientSerializer<? extends Ingredient> getSerializer()
- Overrides:
getSerializer
in classIngredient
-
getChildren
@Nonnull public java.util.Collection<Ingredient> getChildren()
-
toJson
public com.google.gson.JsonElement toJson()
- Overrides:
toJson
in classIngredient
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmpty
in classIngredient
-
-