Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void setAmount(BigInteger amount) {
- this.amount = amount.max(BigInteger.ZERO);
- System.out.println("amount of item " + amount);
- if (amount.compareTo(BigInteger.ZERO) == 0) {
- setItemStack(null);
- } else {
- // We must clone the item, otherwise a dupe will occur
- contents[1] = contents[1].clone();
- ItemStack storageItem = contents[1];
- storageItem.setAmount(Math.min(maxStackSize, amount.intValue()));
- }
- Common.runLaterAsync(0, () -> updateInventoryTitle(amount, null));
- }
Advertisement
Add Comment
Please, Sign In to add comment