Class PartialNBTIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.ingredients.AbstractIngredient
net.minecraftforge.common.crafting.ingredients.PartialNBTIngredient
Ingredient that matches the given items, performing a partial NBT match. Use
StrictNBTIngredient
if you want exact match on NBT-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<PartialNBTIngredient> private final CompoundTag
private final NbtPredicate
static final IIngredientSerializer
<PartialNBTIngredient> Fields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC_NONEMPTY, CONTENTS_STREAM_CODEC, EMPTY, VANILLA_CODEC, VANILLA_MAP_CODEC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PartialNBTIngredient.Builder
builder()
boolean
isSimple()
static PartialNBTIngredient
of
(CompoundTag nbt, ItemLike... items) Creates a new ingredient matching any item from the list, containing the given NBTstatic PartialNBTIngredient
of
(ItemLike item, CompoundTag nbt) Creates a new ingredient matching the given item, containing the given NBTIIngredientSerializer
<? extends Ingredient> boolean
Methods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromValues, of, of, of, of, of
Methods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isVanilla, markValid, toString
-
Field Details
-
items
-
nbt
-
predicate
-
CODEC
-
SERIALIZER
-
-
Constructor Details
-
PartialNBTIngredient
-
-
Method Details
-
builder
-
of
Creates a new ingredient matching any item from the list, containing the given NBT -
of
Creates a new ingredient matching the given item, containing the given NBT -
test
- Specified by:
test
in interfacePredicate<ItemStack>
- Overrides:
test
in classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimple
in classAbstractIngredient
-
serializer
- Specified by:
serializer
in classAbstractIngredient
-