broken-arrow

Untitled

Oct 22nd, 2021
577
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @Override
  2.     public void setAmount(BigInteger amount) {
  3.         this.amount = amount.max(BigInteger.ZERO);
  4.         System.out.println("amount of item " + amount);
  5.         if (amount.compareTo(BigInteger.ZERO) == 0) {
  6.             setItemStack(null);
  7.         } else {
  8.             // We must clone the item, otherwise a dupe will occur
  9.             contents[1] = contents[1].clone();
  10.             ItemStack storageItem = contents[1];
  11.             storageItem.setAmount(Math.min(maxStackSize, amount.intValue()));
  12.         }
  13.         Common.runLaterAsync(0, () -> updateInventoryTitle(amount, null));
  14.     }
RAW Paste Data