Class CompoundIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.neoforged.neoforge.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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<Ingredient>static final com.mojang.serialization.Codec<CompoundIngredient>static final com.mojang.serialization.Codec<CompoundIngredient>static final com.mojang.serialization.Codec<CompoundIngredient>static final com.mojang.serialization.Codec<CompoundIngredient>private final booleanprivate final booleanFields 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 TypeMethodDescription@NotNull List<Ingredient>getItems()it.unimi.dsi.fastutil.ints.IntListbooleanisSimple()static Ingredientof(Ingredient... children) Creates a compound ingredient from the given list of ingredientsbooleanReturns iftrue, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec.booleanMethods inherited from class net.minecraft.world.item.crafting.Ingredient
areStacksEqual, equals, fromJson, fromNetwork, fromValues, getType, getValues, isEmpty, of, of, of, of, of, toJson, toNetwork
-
Field Details
-
CODEC
-
DIRECT_CODEC
-
CODEC_NONEMPTY
-
DIRECT_CODEC_NONEMPTY
-
children
-
isSimple
private final boolean isSimple -
synchronizeWithContents
private final boolean synchronizeWithContents
-
-
Constructor Details
-
CompoundIngredient
-
-
Method Details
-
of
Creates a compound ingredient from the given list of ingredients -
getItems
- Overrides:
getItemsin classIngredient
-
test
- Specified by:
testin interfacePredicate<ItemStack>- Overrides:
testin classIngredient
-
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds()- Overrides:
getStackingIdsin classIngredient
-
isSimple
public boolean isSimple()- Overrides:
isSimplein classIngredient
-
synchronizeWithContents
public boolean synchronizeWithContents()Description copied from class:IngredientReturns iftrue, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec.- Overrides:
synchronizeWithContentsin classIngredient- Returns:
- if
true, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec
-
getChildren
-