From a04364f6a7591488ac552ea261ea47f1e481e362 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 21 Dec 2012 11:10:23 -0600 Subject: [PATCH] Use max inventory size for new stack. Fixes BUKKIT-3240 By: Wesley Wolfe --- .../java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 280a2a5fa8..c2085a8242 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -290,6 +290,7 @@ public class CraftInventory implements Inventory { // More than a single stack! if (item.getAmount() > getMaxItemStack()) { CraftItemStack stack = CraftItemStack.asCraftCopy(item); + stack.setAmount(getMaxItemStack()); setItem(firstFree, stack); item.setAmount(item.getAmount() - getMaxItemStack()); } else {