Class ChildBasedIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.neoforged.neoforge.common.crafting.ChildBasedIngredient
- Direct Known Subclasses:
 CompoundIngredient,DifferenceIngredient,IntersectionIngredient
Intermediary class for easing handling of ingredients that make use of multiple children
- 
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 TypeFieldDescriptionprotected final List<Ingredient>private @Nullable ItemStack[]private final booleanprivate final booleanFields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC, CODEC_NONEMPTY, EMPTY, LIST_CODEC, LIST_CODEC_NONEMPTY, values, VANILLA_CODEC, VANILLA_CODEC_NONEMPTY - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChildBasedIngredient(Stream<? extends Ingredient.Value> values, Supplier<? extends IngredientType<?>> type, List<Ingredient> children)  - 
Method Summary
Modifier and TypeMethodDescriptionfinal List<Ingredient>final ItemStack[]getItems()final booleanisSimple()final booleanReturns iftrue, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec.final booleanprotected abstract booleantestComplex(@Nullable ItemStack stack) 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
- 
children
 - 
isSimple
private final boolean isSimple - 
synchronizeWithContents
private final boolean synchronizeWithContents - 
filteredMatchingStacks
 
 - 
 - 
Constructor Details
- 
ChildBasedIngredient
protected ChildBasedIngredient(Stream<? extends Ingredient.Value> values, Supplier<? extends IngredientType<?>> type, List<Ingredient> children)  
 - 
 - 
Method Details
- 
generateMatchingStacks
 - 
testComplex
 - 
getItems
- Overrides:
 getItemsin classIngredient
 - 
test
- Specified by:
 testin interfacePredicate<ItemStack>- Overrides:
 testin classIngredient
 - 
isSimple
public final boolean isSimple()- Overrides:
 isSimplein classIngredient
 - 
synchronizeWithContents
public final 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
 
 -