Class StackedContents

java.lang.Object
net.minecraft.world.entity.player.StackedContents

public class StackedContents extends Object
  • Field Details

    • EMPTY

      private static final int EMPTY
      See Also:
    • contents

      public final it.unimi.dsi.fastutil.ints.Int2IntMap contents
  • Constructor Details

    • StackedContents

      public StackedContents()
  • Method Details

    • accountSimpleStack

      public void accountSimpleStack(ItemStack stack)
    • accountStack

      public void accountStack(ItemStack stack)
    • accountStack

      public void accountStack(ItemStack stack, int amount)
    • getStackingIndex

      public static int getStackingIndex(ItemStack stack)
    • has

      boolean has(int stackingIndex)
    • take

      int take(int stackingIndex, int amount)
    • put

      void put(int stackingIndex, int increment)
    • canCraft

      public boolean canCraft(Recipe<?> recipe, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList)
    • canCraft

      public boolean canCraft(Recipe<?> recipe, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList, int amount)
    • getBiggestCraftableStack

      public int getBiggestCraftableStack(RecipeHolder<?> recipe, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList)
    • getBiggestCraftableStack

      public int getBiggestCraftableStack(RecipeHolder<?> recipe, int amount, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList)
    • fromStackingIndex

      public static ItemStack fromStackingIndex(int stackingIndex)
    • clear

      public void clear()