From 5750f77fa4998229d36f6129b62ca3155388ac14 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sun, 23 Nov 2014 00:30:57 -0500 Subject: [PATCH] Prevent double-right-click with empty hand putting items in empty drawer. Fixes dupe bug in comp drawers. --- .../minecraft/storagedrawers/block/tile/TileEntityDrawers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityDrawers.java b/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityDrawers.java index 23bab7f..a660ae5 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityDrawers.java +++ b/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityDrawers.java @@ -155,7 +155,7 @@ public abstract class TileEntityDrawers extends TileEntity implements IDrawerGro if (currentStack != null) count += putItemsIntoSlot(slot, currentStack, currentStack.stackSize); - if (worldObj.getTotalWorldTime() - lastClickTime < 10 && player.getPersistentID().equals(lastClickUUID)) { + if (!drawers[slot].isEmpty() && worldObj.getTotalWorldTime() - lastClickTime < 10 && player.getPersistentID().equals(lastClickUUID)) { for (int i = 0, n = player.inventory.getSizeInventory(); i < n; i++) { ItemStack subStack = player.inventory.getStackInSlot(i); if (subStack != null) {