clone itemstack to return remaining stack (#6353)

This commit is contained in:
Jake Potrebic 2021-08-06 23:55:16 -07:00
parent 77aea984df
commit 835479f878

View file

@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
stack = ItemStack.EMPTY;
+ // Paper start
+ } else {
+ stack = stack.copy(); // Paper - copy stack to return leftover stack
+ stack.setCount(originalCount - stack.getCount());
+ }
+ // Paper end