mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Merge pull request #2937 from HenryLoenwind/vacuumshift
Fix Vacuum Chest shift-click
This commit is contained in:
commit
961c22dce3
1 file changed
+3
-29
@@ -25,6 +25,9 @@ public class ContainerVacuumChest extends ContainerEnder<TileVacuumChest> {
|
||||
|
||||
@Override
|
||||
protected void addSlots(InventoryPlayer playerInv) {
|
||||
filterSlot = new FilterSlot(new InventoryFilterUpgrade(getInv()));
|
||||
addSlotToContainer(filterSlot);
|
||||
|
||||
int x = 8;
|
||||
int y = 18;
|
||||
int index = -1;
|
||||
@@ -33,9 +36,6 @@ public class ContainerVacuumChest extends ContainerEnder<TileVacuumChest> {
|
||||
addSlotToContainer(new Slot(getInv(), ++index, x + j * 18, y + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
filterSlot = new FilterSlot(new InventoryFilterUpgrade(getInv()));
|
||||
addSlotToContainer(filterSlot);
|
||||
}
|
||||
|
||||
public void createGhostSlots(List<GhostSlot> slots) {
|
||||
@@ -49,32 +49,6 @@ public class ContainerVacuumChest extends ContainerEnder<TileVacuumChest> {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user