Class Ingredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
- Direct Known Subclasses:
 ChildBasedIngredient,NBTIngredient
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic interface - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Ingredient>static final com.mojang.serialization.Codec<Ingredient>static final Ingredientprivate ItemStack[]static final com.mojang.serialization.Codec<List<Ingredient>>static final com.mojang.serialization.Codec<List<Ingredient>>private it.unimi.dsi.fastutil.ints.IntListprivate final Supplier<? extends IngredientType<?>>final Ingredient.Value[]static final com.mojang.serialization.Codec<Ingredient>static final com.mojang.serialization.Codec<Ingredient> - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIngredient(Stream<? extends Ingredient.Value> p_43907_) protectedIngredient(Stream<? extends Ingredient.Value> p_43907_, Supplier<? extends IngredientType<?>> type) privateIngredient(Ingredient.Value[] p_301044_) privateIngredient(Ingredient.Value[] p_301044_, Supplier<? extends IngredientType<?>> type)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareStacksEqual(ItemStack left, ItemStack right) private static com.mojang.serialization.Codec<Ingredient>codec(boolean p_301074_) booleanstatic IngredientfromJson(com.google.gson.JsonElement element, boolean nonEmpty) static IngredientfromNetwork(FriendlyByteBuf p_43941_) static IngredientfromValues(Stream<? extends Ingredient.Value> p_43939_) getItems()it.unimi.dsi.fastutil.ints.IntListgetType()final Ingredient.Value[]booleanisEmpty()booleanisSimple()static Ingredientof()static Ingredientstatic Ingredientstatic Ingredientstatic IngredientbooleanReturns iftrue, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec.booleanfinal voidtoNetwork(FriendlyByteBuf p_43924_)  
- 
Field Details
- 
EMPTY
 - 
values
 - 
itemStacks
 - 
stackingIds
@Nullable private it.unimi.dsi.fastutil.ints.IntList stackingIds - 
type
 - 
VANILLA_CODEC
 - 
VANILLA_CODEC_NONEMPTY
 - 
CODEC
 - 
CODEC_NONEMPTY
 - 
LIST_CODEC
 - 
LIST_CODEC_NONEMPTY
 
 - 
 - 
Constructor Details
- 
Ingredient
 - 
Ingredient
 - 
Ingredient
protected Ingredient(Stream<? extends Ingredient.Value> p_43907_, Supplier<? extends IngredientType<?>> type)  - 
Ingredient
 
 - 
 - 
Method Details
- 
getType
 - 
getItems
 - 
test
 - 
areStacksEqual
 - 
getStackingIds
public it.unimi.dsi.fastutil.ints.IntList getStackingIds() - 
toNetwork
 - 
synchronizeWithContents
public boolean synchronizeWithContents()Returns iftrue, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec.- Returns:
 - if 
true, this ingredient will be synchronized using its contents, as in vanilla, otherwise it will be synchronized via thecodec 
 - 
isEmpty
public boolean isEmpty() - 
equals
 - 
isSimple
public boolean isSimple() - 
fromValues
 - 
of
 - 
of
 - 
of
 - 
of
 - 
of
 - 
fromJson
 - 
fromNetwork
 - 
codec
 - 
getValues
 
 -