mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
clone itemstack to return remaining stack (#6353)
This commit is contained in:
parent
77aea984df
commit
835479f878
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
stack = ItemStack.EMPTY;
|
stack = ItemStack.EMPTY;
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ } else {
|
+ } else {
|
||||||
|
+ stack = stack.copy(); // Paper - copy stack to return leftover stack
|
||||||
+ stack.setCount(originalCount - stack.getCount());
|
+ stack.setCount(originalCount - stack.getCount());
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
Loading…
Reference in a new issue