Prevent double-right-click with empty hand putting items in empty drawer. Fixes dupe bug in comp drawers.

This commit is contained in:
Justin Aquadro committed 2014-11-23 00:30:57 -05:00
1 parent 43bb3a4540
commit 5750f77fa4
1 file changed
+1 -1
@@ -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) {