mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
Use max inventory size for new stack. Fixes BUKKIT-3240
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
5d61bfd5fa
commit
a04364f6a7
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue