Class ItemHelper

java.lang.Object
com.simibubi.create.foundation.item.ItemHelper

public class ItemHelper extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addToList(net.minecraft.world.item.ItemStack stack, List<net.minecraft.world.item.ItemStack> stacks)
     
    static int
    calcRedstoneFromInventory(net.minecraftforge.items.IItemHandler inv)
     
    static boolean
    canItemStackAmountsStack(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b)
     
    static List<Pair<net.minecraft.world.item.crafting.Ingredient,org.apache.commons.lang3.mutable.MutableInt>>
    condenseIngredients(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> recipeIngredients)
     
    static void
    dropContents(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraftforge.items.IItemHandler inv)
     
    static net.minecraft.world.item.ItemStack
    extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, boolean simulate)
     
    static net.minecraft.world.item.ItemStack
    extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, int exactAmount, boolean simulate)
     
    static net.minecraft.world.item.ItemStack
    extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, ItemHelper.ExtractionCountMode mode, int amount, boolean simulate)
     
    static net.minecraft.world.item.ItemStack
    extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, Function<net.minecraft.world.item.ItemStack,Integer> amountFunction, boolean simulate)
     
    static net.minecraft.world.item.ItemStack
    findFirstMatch(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test)
     
    static int
    findFirstMatchingSlotIndex(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test)
     
    static boolean
    isSameInventory(net.minecraftforge.items.IItemHandler h1, net.minecraftforge.items.IItemHandler h2)
     
    static boolean
    matchAllIngredients(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients)
     
    static boolean
    matchIngredients(net.minecraft.world.item.crafting.Ingredient i1, net.minecraft.world.item.crafting.Ingredient i2)
     
    static List<net.minecraft.world.item.ItemStack>
    multipliedOutput(net.minecraft.world.item.ItemStack in, net.minecraft.world.item.ItemStack out)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemHelper

      public ItemHelper()
  • Method Details

    • dropContents

      public static void dropContents(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraftforge.items.IItemHandler inv)
    • multipliedOutput

      public static List<net.minecraft.world.item.ItemStack> multipliedOutput(net.minecraft.world.item.ItemStack in, net.minecraft.world.item.ItemStack out)
    • addToList

      public static void addToList(net.minecraft.world.item.ItemStack stack, List<net.minecraft.world.item.ItemStack> stacks)
    • isSameInventory

      public static boolean isSameInventory(net.minecraftforge.items.IItemHandler h1, net.minecraftforge.items.IItemHandler h2)
    • calcRedstoneFromInventory

      public static int calcRedstoneFromInventory(@Nullable net.minecraftforge.items.IItemHandler inv)
    • condenseIngredients

      public static List<Pair<net.minecraft.world.item.crafting.Ingredient,org.apache.commons.lang3.mutable.MutableInt>> condenseIngredients(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> recipeIngredients)
    • matchIngredients

      public static boolean matchIngredients(net.minecraft.world.item.crafting.Ingredient i1, net.minecraft.world.item.crafting.Ingredient i2)
    • matchAllIngredients

      public static boolean matchAllIngredients(net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients)
    • extract

      public static net.minecraft.world.item.ItemStack extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, boolean simulate)
    • extract

      public static net.minecraft.world.item.ItemStack extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, int exactAmount, boolean simulate)
    • extract

      public static net.minecraft.world.item.ItemStack extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, ItemHelper.ExtractionCountMode mode, int amount, boolean simulate)
    • extract

      public static net.minecraft.world.item.ItemStack extract(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test, Function<net.minecraft.world.item.ItemStack,Integer> amountFunction, boolean simulate)
    • canItemStackAmountsStack

      public static boolean canItemStackAmountsStack(net.minecraft.world.item.ItemStack a, net.minecraft.world.item.ItemStack b)
    • findFirstMatch

      public static net.minecraft.world.item.ItemStack findFirstMatch(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test)
    • findFirstMatchingSlotIndex

      public static int findFirstMatchingSlotIndex(net.minecraftforge.items.IItemHandler inv, Predicate<net.minecraft.world.item.ItemStack> test)