Class StackedIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
me.desht.pneumaticcraft.api.crafting.ingredient.StackedIngredient
- All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>
public class StackedIngredient
extends net.minecraft.world.item.crafting.Ingredient
Like a vanilla Ingredient, but also compares the size of the input ingredient. Useful for machine recipes which
can take multiples of an input item.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordstatic classNested 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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.item.crafting.IngredientfromIngredient(int count, net.minecraft.world.item.crafting.Ingredient wrappedIngredient) static StackedIngredientfromItemListStream(Stream<? extends net.minecraft.world.item.crafting.Ingredient.Value> stream) static net.minecraft.world.item.crafting.IngredientfromItems(int count, net.minecraft.world.level.ItemLike... itemsIn) static net.minecraft.world.item.crafting.IngredientfromStacks(net.minecraft.world.item.ItemStack... stacks) static net.minecraft.world.item.crafting.IngredientfromTag(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag, int count) net.minecraftforge.common.crafting.IIngredientSerializer<? extends net.minecraft.world.item.crafting.Ingredient>booleantest(net.minecraft.world.item.ItemStack checkingStack) Methods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, fromJson, fromNetwork, fromValues, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isSimple, isVanilla, markValid, merge, of, of, of, of, of, toJson, toNetwork, valueFromJson
-
Field Details
-
EMPTY
-
-
Method Details
-
fromTag
public static net.minecraft.world.item.crafting.Ingredient fromTag(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag, int count) -
fromStacks
public static net.minecraft.world.item.crafting.Ingredient fromStacks(net.minecraft.world.item.ItemStack... stacks) -
fromItems
public static net.minecraft.world.item.crafting.Ingredient fromItems(int count, net.minecraft.world.level.ItemLike... itemsIn) -
fromIngredient
public static net.minecraft.world.item.crafting.Ingredient fromIngredient(int count, net.minecraft.world.item.crafting.Ingredient wrappedIngredient) -
fromItemListStream
public static StackedIngredient fromItemListStream(Stream<? extends net.minecraft.world.item.crafting.Ingredient.Value> stream) -
getSerializer
public net.minecraftforge.common.crafting.IIngredientSerializer<? extends net.minecraft.world.item.crafting.Ingredient> getSerializer()- Overrides:
getSerializerin classnet.minecraft.world.item.crafting.Ingredient
-
test
public boolean test(@Nullable net.minecraft.world.item.ItemStack checkingStack)
-