diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java index 17f2267..2fab351 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java @@ -256,9 +256,8 @@ public abstract class ControllableDrawerTile playerIn.setItemInHand(hand, getStorage().insertItem(slot, stack, false)); } else if (System.currentTimeMillis() - INTERACTION_LOGGER.getOrDefault(playerIn.getUUID(), System.currentTimeMillis()) < 300) { for (ItemStack itemStack : playerIn.getInventory().items) { - if (!itemStack.isEmpty() && getStorage().insertItem(slot, itemStack, true).isEmpty()) { - getStorage().insertItem(slot, itemStack.copy(), false); - itemStack.setCount(0); + if (!itemStack.isEmpty() && !getStorage().getStackInSlot(slot).isEmpty() && getStorage().insertItem(slot, itemStack, true).getCount() != stack.getCount()) { + itemStack.setCount(getStorage().insertItem(slot, itemStack.copy(), false).getCount()); } } } diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java index c740972..1f745b6 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java @@ -81,9 +81,8 @@ public class DrawerControllerTile extends ControllableDrawerTile