Class NegativeItemUtil

java.lang.Object
com.viaversion.viafabricplus.features.item.negative_item_count.NegativeItemUtil

public final class NegativeItemUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    getCount(net.minecraft.world.item.ItemStack stack)
    Returns the actual amount of items in the stack, versions older or equal to 1.10 can have negative stack sizes which are not represented by ItemStack.getCount().

    Methods inherited from class Object

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

    • NegativeItemUtil

      public NegativeItemUtil()
  • Method Details

    • getCount

      public static int getCount(net.minecraft.world.item.ItemStack stack)
      Returns the actual amount of items in the stack, versions older or equal to 1.10 can have negative stack sizes which are not represented by ItemStack.getCount().
      Parameters:
      stack - The stack to get the count from
      Returns:
      The actual amount of items in the stack