Class StackMath

java.lang.Object
com.ultikits.ultitools.ui.container.StackMath

@Internal final class StackMath extends Object
Copying and similarity-based item arithmetic; max sizes always come from the stack.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static org.bukkit.inventory.ItemStack
    amount(org.bukkit.inventory.ItemStack item, int amount)
     
    (package private) static List<org.bukkit.inventory.ItemStack>
    copies(List<org.bukkit.inventory.ItemStack> items)
     
    (package private) static org.bukkit.inventory.ItemStack
    copy(org.bukkit.inventory.ItemStack item)
     
    (package private) static int
    count(org.bukkit.inventory.ItemStack item)
     
    (package private) static List<org.bukkit.inventory.ItemStack>
    empty(int size)
     
    (package private) static int
    fit(ViewerItems side, org.bukkit.inventory.ItemStack item)
     
    (package private) static void
    insert(ViewerItems side, org.bukkit.inventory.ItemStack item, int count)
     
    private static int
    insertPass(ViewerItems side, org.bukkit.inventory.ItemStack item, int count, boolean empty)
     
    (package private) static List<org.bukkit.inventory.ItemStack>
    merged(List<org.bukkit.inventory.ItemStack> items)
     
    private static void
    mergeOne(List<org.bukkit.inventory.ItemStack> result, org.bukkit.inventory.ItemStack source)
     
    (package private) static int
    room(org.bukkit.inventory.ItemStack target, org.bukkit.inventory.ItemStack source)
     
    (package private) static List<org.bukkit.inventory.ItemStack>
    subtract(List<org.bukkit.inventory.ItemStack> held, List<org.bukkit.inventory.ItemStack> removed)
     
    private static void
    subtractOne(List<org.bukkit.inventory.ItemStack> remaining, org.bukkit.inventory.ItemStack source)
     

    Methods inherited from class Object

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

    • StackMath

      private StackMath()
  • Method Details

    • copy

      static org.bukkit.inventory.ItemStack copy(org.bukkit.inventory.ItemStack item)
    • copies

      static List<org.bukkit.inventory.ItemStack> copies(List<org.bukkit.inventory.ItemStack> items)
    • amount

      static org.bukkit.inventory.ItemStack amount(org.bukkit.inventory.ItemStack item, int amount)
    • count

      static int count(org.bukkit.inventory.ItemStack item)
    • room

      static int room(org.bukkit.inventory.ItemStack target, org.bukkit.inventory.ItemStack source)
    • empty

      static List<org.bukkit.inventory.ItemStack> empty(int size)
    • merged

      static List<org.bukkit.inventory.ItemStack> merged(List<org.bukkit.inventory.ItemStack> items)
    • mergeOne

      private static void mergeOne(List<org.bukkit.inventory.ItemStack> result, org.bukkit.inventory.ItemStack source)
    • subtract

      static List<org.bukkit.inventory.ItemStack> subtract(List<org.bukkit.inventory.ItemStack> held, List<org.bukkit.inventory.ItemStack> removed)
    • subtractOne

      private static void subtractOne(List<org.bukkit.inventory.ItemStack> remaining, org.bukkit.inventory.ItemStack source)
    • fit

      static int fit(ViewerItems side, org.bukkit.inventory.ItemStack item)
    • insert

      static void insert(ViewerItems side, org.bukkit.inventory.ItemStack item, int count)
    • insertPass

      private static int insertPass(ViewerItems side, org.bukkit.inventory.ItemStack item, int count, boolean empty)