From 60f8688e7c8393e4b03752bd3baec45c94572f61 Mon Sep 17 00:00:00 2001 From: HenryLoenwind Date: Fri, 30 Oct 2015 12:05:52 +0100 Subject: [PATCH] Fix Vacuum Chest shift-click by removing it. The ContainerEnder one does the right thing already. Also moved filter slot to first position; so shift-clicking a filter upgrade into the vacuum chest does the expected thing. --- .../machine/vacuum/ContainerVacuumChest.java | 32 ++----------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/src/main/java/crazypants/enderio/machine/vacuum/ContainerVacuumChest.java b/src/main/java/crazypants/enderio/machine/vacuum/ContainerVacuumChest.java index 5e9e60fc..87d0d565 100644 --- a/src/main/java/crazypants/enderio/machine/vacuum/ContainerVacuumChest.java +++ b/src/main/java/crazypants/enderio/machine/vacuum/ContainerVacuumChest.java @@ -20,6 +20,9 @@ public class ContainerVacuumChest extends ContainerEnder { @Override protected void addSlots(InventoryPlayer playerInv) { + filterSlot = new FilterSlot(new InventoryFilterUpgrade(getInv())); + addSlotToContainer(filterSlot); + int x = 8; int y = 18; int index = -1; @@ -28,9 +31,6 @@ public class ContainerVacuumChest extends ContainerEnder { addSlotToContainer(new Slot(getInv(), ++index, x + j * 18, y + i * 18)); } } - - filterSlot = new FilterSlot(new InventoryFilterUpgrade(getInv())); - addSlotToContainer(filterSlot); } @Override @@ -40,32 +40,6 @@ public class ContainerVacuumChest extends ContainerEnder { return p; } - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(par2); - - if(slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - if(par2 < TileVacuumChest.ITEM_SLOTS) { - if(!this.mergeItemStack(itemstack1, TileVacuumChest.ITEM_SLOTS, this.inventorySlots.size()-1, true)) { - return null; - } - } else if(!this.mergeItemStack(itemstack1, 0, TileVacuumChest.ITEM_SLOTS, false)) { - return null; - } - - if(itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } - } - return itemstack; - } - void setFilterChangedCB(Runnable filterChangedCB) { this.filterChangedCB = filterChangedCB; }