Class CompoundIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.AbstractIngredient
net.minecraftforge.common.crafting.CompoundIngredient
Ingredient that matches if any of the child ingredients match
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value
-
Field Summary
Modifier and TypeFieldDescriptionprivate List<Ingredient>
private final boolean
private it.unimi.dsi.fastutil.ints.IntList
private ItemStack[]
Fields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<Ingredient>
@NotNull ItemStack[]
getItems()
IIngredientSerializer<? extends Ingredient>
@NotNull it.unimi.dsi.fastutil.ints.IntList
protected void
boolean
isEmpty()
boolean
isSimple()
static Ingredient
of
(Ingredient... children) Creates a compound ingredient from the given list of ingredientsboolean
com.google.gson.JsonElement
toJson()
Methods inherited from class net.minecraftforge.common.crafting.AbstractIngredient
fromJson, fromNetwork, fromValues, of, of, of, of, of
Methods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, fromJson, invalidateAll, isVanilla, markValid, merge, toNetwork, valueFromJson
-
Field Details
-
children
-
stacks
-
itemIds
private it.unimi.dsi.fastutil.ints.IntList itemIds -
isSimple
private final boolean isSimple
-
-
Constructor Details
-
CompoundIngredient
-
-
Method Details
-
of
Creates a compound ingredient from the given list of ingredients -
getItems
- Overrides:
getItems
in classIngredient
-
getStackingIds
@NotNull public @NotNull it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIds
in classIngredient
-
test
- Specified by:
test
in interfacePredicate<ItemStack>
- Overrides:
test
in classIngredient
-
invalidate
protected void invalidate()- Overrides:
invalidate
in classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimple
in classAbstractIngredient
-
getSerializer
- Specified by:
getSerializer
in classAbstractIngredient
-
getChildren
-
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJson
in classAbstractIngredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classIngredient
-