Class IntersectionIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.AbstractIngredient
net.minecraftforge.common.crafting.IntersectionIngredient
Ingredient that matches if all 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 final List<Ingredient>
private ItemStack[]
private final boolean
private it.unimi.dsi.fastutil.ints.IntList
Fields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetItems()
it.unimi.dsi.fastutil.ints.IntList
protected void
boolean
isEmpty()
boolean
isSimple()
static Ingredient
of
(Ingredient... ingredients) Gets an intersection ingredientboolean
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
-
isSimple
private final boolean isSimple -
intersectedMatchingStacks
-
packedMatchingStacks
private it.unimi.dsi.fastutil.ints.IntList packedMatchingStacks
-
-
Constructor Details
-
IntersectionIngredient
-
-
Method Details
-
of
Gets an intersection ingredient- Parameters:
ingredients
- List of ingredients to match- Returns:
- Ingredient that only matches if all the passed ingredients match
-
test
- Specified by:
test
in interfacePredicate<ItemStack>
- Overrides:
test
in classIngredient
-
getItems
- Overrides:
getItems
in classIngredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimple
in classAbstractIngredient
-
invalidate
protected void invalidate()- Overrides:
invalidate
in classIngredient
-
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIds
in classIngredient
-
toJson
public com.google.gson.JsonElement toJson()- Specified by:
toJson
in classAbstractIngredient
-
getSerializer
- Specified by:
getSerializer
in classAbstractIngredient
-