mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 18:07:39 +01:00
Use max inventory size for new stack. Fixes BUKKIT-3240
This commit is contained in:
parent
708252c020
commit
b870755edb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user