Class Ingredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
- All Implemented Interfaces:
Predicate<ItemStack>,StackedContents.IngredientInfo<Holder<Item>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Ingredient> static final StreamCodec<RegistryFriendlyByteBuf, Ingredient> private ICustomIngredientstatic final StreamCodec<RegistryFriendlyByteBuf, Optional<Ingredient>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIngredient(HolderSet<Item> p_365027_) Ingredient(ICustomIngredient customIngredient) -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsItem(Holder<Item> pItem) display()static SlotDisplaydisplayForSingleItem(Holder<Item> p_380940_) booleanRetrieves the underlying values of this ingredient.Retrieves the holder set to use for syncing simple ingredientsinthashCode()booleanisCustom()booleanisEmpty()booleanisSimple()items()Deprecated.static Ingredientstatic Ingredientstatic Ingredientstatic Ingredientstatic SlotDisplayoptionalIngredientToDisplay(Optional<Ingredient> pIngredient) booleanstatic booleantestOptionalIngredient(Optional<Ingredient> pIngredient, ItemStack pStack)
-
Field Details
-
CONTENTS_STREAM_CODEC
-
OPTIONAL_CONTENTS_STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,Optional<Ingredient>> OPTIONAL_CONTENTS_STREAM_CODEC -
NON_AIR_HOLDER_SET_CODEC
-
CODEC
-
values
-
customIngredient
-
customIngredientValues
-
-
Constructor Details
-
Ingredient
-
Ingredient
-
-
Method Details
-
testOptionalIngredient
-
items
Deprecated. -
isEmpty
public boolean isEmpty() -
test
-
acceptsItem
- Specified by:
acceptsItemin interfaceStackedContents.IngredientInfo<Holder<Item>>
-
equals
-
hashCode
public int hashCode() -
getValues
Retrieves the underlying values of this ingredient. If this is a custom ingredient, an exception is thrown. -
getValuesForSync
Retrieves the holder set to use for syncing simple ingredients -
isSimple
public boolean isSimple() -
getCustomIngredient
-
isCustom
public boolean isCustom() -
updateCustomIngredientValues
-
of
-
of
-
of
-
of
-
display
-
optionalIngredientToDisplay
-
displayForSingleItem
-