Package com.stereowalker.unionlib.forge
Class ComponentIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.ingredients.AbstractIngredient
com.stereowalker.unionlib.forge.ComponentIngredient
- All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>
public class ComponentIngredient
extends net.minecraftforge.common.crafting.ingredients.AbstractIngredient
Ingredient that matches the given items, performing a partial NBT match unless strict is set.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
net.minecraft.world.item.crafting.Ingredient.ItemValue, net.minecraft.world.item.crafting.Ingredient.TagValue, net.minecraft.world.item.crafting.Ingredient.Value -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ComponentIngredient> static final net.minecraftforge.common.crafting.ingredients.IIngredientSerializer<ComponentIngredient> Fields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC_NONEMPTY, CONTENTS_STREAM_CODEC, EMPTY, VANILLA_CODEC, VANILLA_MAP_CODEC -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentIngredient.Builderbuilder()booleanisSimple()static ComponentIngredientCreates a new ingredient matching the given item, containing the given NBTstatic ComponentIngredientof(List<net.minecraft.world.item.Item> items, net.minecraft.core.component.DataComponentPatch nbt, boolean strict) static ComponentIngredientof(net.minecraft.core.component.DataComponentPatch nbt, net.minecraft.world.level.ItemLike... items) Creates a new ingredient matching any item from the list, containing the given NBTstatic ComponentIngredientof(net.minecraft.world.level.ItemLike item, net.minecraft.core.component.DataComponentPatch nbt) Creates a new ingredient matching the given item, containing the given NBTstatic ComponentIngredientof(net.minecraft.world.level.ItemLike item, net.minecraft.core.component.DataComponentPatch nbt, boolean strict) net.minecraftforge.common.crafting.ingredients.IIngredientSerializer<? extends net.minecraft.world.item.crafting.Ingredient> booleantest(net.minecraft.world.item.ItemStack stack) Methods inherited from class net.minecraftforge.common.crafting.ingredients.AbstractIngredient
fromValues, of, of, of, of, ofMethods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isVanilla, markValid, toString
-
Field Details
-
CODEC
-
SERIALIZER
public static final net.minecraftforge.common.crafting.ingredients.IIngredientSerializer<ComponentIngredient> SERIALIZER
-
-
Method Details
-
builder
-
of
public static ComponentIngredient of(net.minecraft.core.component.DataComponentPatch nbt, net.minecraft.world.level.ItemLike... items) Creates a new ingredient matching any item from the list, containing the given NBT -
of
public static ComponentIngredient of(net.minecraft.world.level.ItemLike item, net.minecraft.core.component.DataComponentPatch nbt) Creates a new ingredient matching the given item, containing the given NBT -
of
public static ComponentIngredient of(net.minecraft.world.level.ItemLike item, net.minecraft.core.component.DataComponentPatch nbt, boolean strict) -
of
public static ComponentIngredient of(List<net.minecraft.world.item.Item> items, net.minecraft.core.component.DataComponentPatch nbt) Creates a new ingredient matching the given item, containing the given NBT -
of
public static ComponentIngredient of(List<net.minecraft.world.item.Item> items, net.minecraft.core.component.DataComponentPatch nbt, boolean strict) -
test
public boolean test(net.minecraft.world.item.ItemStack stack) -
isSimple
public boolean isSimple()- Specified by:
isSimplein classnet.minecraftforge.common.crafting.ingredients.AbstractIngredient
-
serializer
public net.minecraftforge.common.crafting.ingredients.IIngredientSerializer<? extends net.minecraft.world.item.crafting.Ingredient> serializer()- Specified by:
serializerin classnet.minecraftforge.common.crafting.ingredients.AbstractIngredient
-