类 Ingredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
- 所有已实现的接口:
Predicate<ItemStack>
,StackedContents.IngredientInfo<Holder<Item>>
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<Ingredient> static final StreamCodec
<RegistryFriendlyByteBuf, Ingredient> private ICustomIngredient
static final StreamCodec
<RegistryFriendlyByteBuf, Optional<Ingredient>> -
构造器概要
构造器限定符构造器说明private
Ingredient
(HolderSet<Item> p_365027_) Ingredient
(ICustomIngredient customIngredient) -
方法概要
修饰符和类型方法说明boolean
acceptsItem
(Holder<Item> p_389400_) display()
static SlotDisplay
displayForSingleItem
(Holder<Item> p_380940_) boolean
Retrieves the underlying values of this ingredient.Retrieves the holder set to use for syncing simple ingredientsint
hashCode()
boolean
isCustom()
boolean
isEmpty()
boolean
isSimple()
items()
已过时。static Ingredient
static Ingredient
static Ingredient
static Ingredient
static SlotDisplay
optionalIngredientToDisplay
(Optional<Ingredient> p_381167_) boolean
static boolean
testOptionalIngredient
(Optional<Ingredient> p_362504_, ItemStack p_363604_)
-
字段详细资料
-
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
-
-
构造器详细资料
-
Ingredient
-
Ingredient
-
-
方法详细资料
-
testOptionalIngredient
-
items
已过时。 -
isEmpty
public boolean isEmpty() -
test
-
acceptsItem
- 指定者:
acceptsItem
在接口中StackedContents.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
-