Class IntersectionIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.neoforged.neoforge.common.crafting.ChildBasedIngredient
net.neoforged.neoforge.common.crafting.IntersectionIngredient
Ingredient that matches if all 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 TypeFieldDescriptionstatic final com.mojang.serialization.Codec<IntersectionIngredient>
static final com.mojang.serialization.Codec<IntersectionIngredient>
Fields inherited from class net.neoforged.neoforge.common.crafting.ChildBasedIngredient
children
Fields inherited from class net.minecraft.world.item.crafting.Ingredient
EMPTY, LIST_CODEC, LIST_CODEC_NONEMPTY, values, VANILLA_CODEC, VANILLA_CODEC_NONEMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Ingredient
of
(Ingredient... ingredients) Gets an intersection ingredientprotected boolean
testComplex
(@Nullable ItemStack stack) Methods inherited from class net.neoforged.neoforge.common.crafting.ChildBasedIngredient
getChildren, getItems, isSimple, synchronizeWithContents, test
Methods inherited from class net.minecraft.world.item.crafting.Ingredient
areStacksEqual, equals, fromJson, fromNetwork, fromValues, getStackingIds, getType, getValues, isEmpty, of, of, of, of, of, toNetwork
-
Field Details
-
CODEC
-
CODEC_NONEMPTY
-
-
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
-
generateMatchingStacks
- Specified by:
generateMatchingStacks
in classChildBasedIngredient
-
testComplex
- Specified by:
testComplex
in classChildBasedIngredient
-