Class IntersectionIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.ingredients.AbstractIngredient
net.minecraftforge.common.crafting.ingredients.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> static final com.mojang.serialization.MapCodec
<IntersectionIngredient> private ItemStack[]
private final boolean
private it.unimi.dsi.fastutil.ints.IntList
static final IIngredientSerializer
<IntersectionIngredient> Fields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC_NONEMPTY, CONTENTS_STREAM_CODEC, EMPTY, VANILLA_CODEC, VANILLA_MAP_CODEC
-
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
Methods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromValues, of, of, of, of, of
Methods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, invalidateAll, isVanilla, markValid, toString
-
Field Details
-
children
-
isSimple
private final boolean isSimple -
intersectedMatchingStacks
-
packedMatchingStacks
private it.unimi.dsi.fastutil.ints.IntList packedMatchingStacks -
CODEC
-
SERIALIZER
-
-
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
-
serializer
- Specified by:
serializer
in classAbstractIngredient
-