From b870755edb3d17c3609b9c7d53c084d920e47fa2 Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Fri, 21 Dec 2012 11:10:23 -0600 Subject: [PATCH] Use max inventory size for new stack. Fixes BUKKIT-3240 --- .../java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 280a2a5fa8..c2085a8242 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/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 {