net.minecraft.recipe

public final class Ingredient

implements Predicate<ItemStack>, RecipeMatcher$RawIngredient<RegistryEntry<Item>>

net.minecraft.world.item.crafting.Ingredient
net.minecraft.class_1856
net.minecraft.recipe.Ingredient

Field summary

Modifier and TypeField
public static final PacketCodec<RegistryByteBuf, Ingredient>
CONTENTS_STREAM_CODEC
field_48355
PACKET_CODEC
public static final PacketCodec<RegistryByteBuf, Optional<Ingredient>>
OPTIONAL_CONTENTS_STREAM_CODEC
field_52595
OPTIONAL_PACKET_CODEC
public static final com.mojang.serialization.Codec<RegistryEntryList<Item>>
NON_AIR_HOLDER_SET_CODEC
field_52596
ENTRIES_CODEC
public static final com.mojang.serialization.Codec<Ingredient>
CODEC
field_46095
CODEC
private final RegistryEntryList<Item>
values
field_9019
entries

Constructor summary

ModifierConstructor
private (RegistryEntryList<Item> entries)

Method summary

Modifier and TypeMethod
public static boolean
testOptionalIngredient(Optional<Ingredient> ingredient, ItemStack stack)
method_61676(Optional<class_1856> arg0, class_1799 arg1)
matches(Optional<Ingredient> ingredient, ItemStack stack)
public Stream<RegistryEntry<Item>>
items()
method_8105()
getMatchingItems()
public boolean
isEmpty()
method_65799()
isEmpty()
public boolean
test(ItemStack input)
method_8093(class_1799 arg0)
test(ItemStack arg0)
public boolean
acceptsItem(Holder<Item> item)
method_65798(class_6880<class_1792> arg0)
acceptsItem(RegistryEntry<Item> arg0)
public static Ingredient
of(ItemLike itemLike)
method_8101(class_1935 arg0)
ofItem(ItemConvertible item)
public static Ingredient
of(ItemLike... items)
method_8091(class_1935... arg0)
ofItems(ItemConvertible... items)
public static Ingredient
of(Stream<? extends ItemLike> stream)
method_26964(Stream<? extends class_1935> arg0)
ofItems(Stream<? extends ItemConvertible> stacks)
public static Ingredient
of(HolderSet<Item> tag)
method_8106(class_6885<class_1792> arg0)
ofTag(RegistryEntryList<Item> tag)
public SlotDisplay
display()
method_64673()
toDisplay()
public static SlotDisplay
optionalIngredientToDisplay(Optional<Ingredient> ingredient)
method_64980(Optional<class_1856> arg0)
toDisplay(Optional<Ingredient> ingredient)
private static SlotDisplay
displayForSingleItem(Holder<Item> item)
method_64981(class_6880<class_1792> arg0)
createDisplayWithRemainder(RegistryEntry<Item> displayedItem)
public boolean
test(Object input)
test(Object arg0)
test(Object stack)
public boolean
acceptsItem(Object item)
method_1_198(Object arg0)
acceptsItem(Object arg0)
private static Record
lambda$display$0(List arg0)
method_64672(List arg0)
method_64672(List items)
private static RegistryEntry$Reference
lambda$of$0(ItemLike arg0)
method_61678(class_1935 arg0)
method_61678(ItemConvertible item)
private static Boolean
lambda$testOptionalIngredient$0(ItemStack arg0, Ingredient arg1)
method_61672(class_1799 arg0, class_1856 arg1)
method_61672(ItemStack arg0, Ingredient ingredient2)
private static void
lambda$new$0(List arg0)
method_61674(List arg0)
method_61674(List list)
private static RegistryEntryList
lambda$static$4(Ingredient arg0)
method_61673(class_1856 arg0)
method_61673(Ingredient ingredient)
private static RegistryEntryList
lambda$static$2(Optional arg0)
method_61675(Optional arg0)
method_61675(Optional optional)
private static RegistryEntryList
lambda$static$3(Ingredient arg0)
method_61677(class_1856 arg0)
method_61677(Ingredient ingredient)
private static Optional
lambda$static$1(HolderSet arg0)
method_61679(class_6885 arg0)
method_61679(RegistryEntryList entries)
private static RegistryEntryList
lambda$static$0(Ingredient arg0)
method_61680(class_1856 arg0)
method_61680(Ingredient ingredient)