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 ClassesNested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<Ingredient>private final booleanprivate it.unimi.dsi.fastutil.ints.IntListprivate ItemStack[]Fields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItems()IIngredientSerializer<? extends Ingredient>it.unimi.dsi.fastutil.ints.IntListprotected voidbooleanisEmpty()booleanisSimple()static Ingredientof(Ingredient... children) Creates a compound ingredient from the given list of ingredientsbooleancom.google.gson.JsonElementtoJson()Methods inherited from class net.minecraftforge.common.crafting.AbstractIngredient
fromJson, fromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, 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:
getItemsin classIngredient
-
getStackingIds
@Nonnull public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIdsin classIngredient
-
test
- Specified by:
testin interfacePredicate<ItemStack>- Overrides:
testin classIngredient
-
invalidate
protected void invalidate()- Overrides:
invalidatein classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimplein classAbstractIngredient
-
getSerializer
- Specified by:
getSerializerin classAbstractIngredient
-
getChildren
-
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJsonin classAbstractIngredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classIngredient
-