Class Ingredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
- Direct Known Subclasses:
- CompoundIngredient,- DifferenceIngredient,- IntersectionIngredient,- NBTIngredient,- TestEnabledIngredient
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic interface
- 
Field SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionprotectedIngredient(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 SummaryModifier 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
- 
Ingredientprotected Ingredient(Stream<? extends Ingredient.Value> p_43907_, Supplier<? extends IngredientType<?>> type) 
- 
Ingredient
 
- 
- 
Method Details- 
getType
- 
getItems
- 
test
- 
areStacksEqual
- 
getStackingIdspublic it.unimi.dsi.fastutil.ints.IntList getStackingIds()
- 
toNetwork
- 
synchronizeWithContentspublic 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
 
- 
isEmptypublic boolean isEmpty()
- 
equals
- 
isSimplepublic boolean isSimple()
- 
fromValues
- 
of
- 
of
- 
of
- 
of
- 
of
- 
fromJson
- 
fromNetwork
- 
codec
- 
getValues
 
-