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 Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static final record 
     
    static class 
     

    Nested 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
    Modifier and Type
    Field
    Description
    static final StackedIngredient
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.crafting.Ingredient
    fromIngredient(int count, net.minecraft.world.item.crafting.Ingredient wrappedIngredient)
     
    fromItemListStream(Stream<? extends net.minecraft.world.item.crafting.Ingredient.Value> stream)
     
    static net.minecraft.world.item.crafting.Ingredient
    fromItems(int count, net.minecraft.world.level.ItemLike... itemsIn)
     
    static net.minecraft.world.item.crafting.Ingredient
    fromStacks(net.minecraft.world.item.ItemStack... stacks)
     
    static net.minecraft.world.item.crafting.Ingredient
    fromTag(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag, int count)
     
    net.minecraftforge.common.crafting.IIngredientSerializer<? extends net.minecraft.world.item.crafting.Ingredient>
     
    boolean
    test(net.minecraft.world.item.ItemStack checkingStack)
     

    Methods inherited from class net.minecraft.world.item.crafting.Ingredient

    checkInvalidation, fromJson, fromJson, fromNetwork, fromValues, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isSimple, isVanilla, markValid, merge, of, of, of, of, of, toJson, toNetwork, valueFromJson

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Field Details

  • 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:
      getSerializer in class net.minecraft.world.item.crafting.Ingredient
    • test

      public boolean test(@Nullable net.minecraft.world.item.ItemStack checkingStack)
      Specified by:
      test in interface Predicate<net.minecraft.world.item.ItemStack>
      Overrides:
      test in class net.minecraft.world.item.crafting.Ingredient