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
FieldsModifier and TypeFieldDescriptionprivate final List<Ingredient> static final com.mojang.serialization.MapCodec<IntersectionIngredient> private ItemStack[]private final booleanprivate it.unimi.dsi.fastutil.ints.IntListstatic 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItems()it.unimi.dsi.fastutil.ints.IntListprotected voidbooleanisEmpty()booleanisSimple()static Ingredientof(Ingredient... ingredients) Gets an intersection ingredientbooleanMethods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromValues, of, of, of, of, ofMethods 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:
testin interfacePredicate<ItemStack>- Overrides:
testin classIngredient
-
getItems
- Overrides:
getItemsin classIngredient
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimplein classAbstractIngredient
-
invalidate
protected void invalidate()- Overrides:
invalidatein classIngredient
-
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIdsin classIngredient
-
serializer
- Specified by:
serializerin classAbstractIngredient
-