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 ClassesNested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PartialNBTIngredient>private final CompoundTagprivate final NbtPredicatestatic final IIngredientSerializer<PartialNBTIngredient>Fields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC_NONEMPTY, EMPTY, VANILLA_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PartialNBTIngredient.Builderbuilder()booleanisSimple()static PartialNBTIngredientof(CompoundTag nbt, ItemLike... items) Creates a new ingredient matching any item from the list, containing the given NBTstatic PartialNBTIngredientof(ItemLike item, CompoundTag nbt) Creates a new ingredient matching the given item, containing the given NBTIIngredientSerializer<? extends Ingredient>booleanMethods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromNetwork, fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isVanilla, markValid, toNetwork, 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:
testin interfacePredicate<ItemStack>- Overrides:
testin classIngredient
-
isSimple
public boolean isSimple()- Specified by:
isSimplein classAbstractIngredient
-
serializer
- Specified by:
serializerin classAbstractIngredient
-