From 835479f87849e17b23f858e4d281c1bd3803986d Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 6 Aug 2021 23:55:16 -0700 Subject: [PATCH] clone itemstack to return remaining stack (#6353) --- .../server/Make-hoppers-respect-inventory-max-stack-size.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch index 5d36b2c1d..228c85fbd 100644 --- a/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch +++ b/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch @@ -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