From 9c931c7836d0a7b1e34c3949214e53baa60d6c26 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 12 Jul 2015 03:13:06 +0200 Subject: [PATCH] Fixed a Bug with the ESD not asking if the Item is valid for a Slot when the slot content is null --- .../ellpeck/actuallyadditions/tile/TileEntityEnergizer.java | 1 - .../java/ellpeck/actuallyadditions/tile/TileEntityInputter.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java index 729db3281..fbd88a44c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java @@ -67,7 +67,6 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne @Override public boolean canExtractItem(int slot, ItemStack stack, int side){ - System.out.println(stack.getItem() instanceof IEnergyContainerItem); return slot == 1; } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java index a2fc68b85..f84c93cbd 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java @@ -209,7 +209,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt if(tempStack.getMaxStackSize() < theInventory.getInventoryStackLimit()) maxSize = tempStack.getMaxStackSize(); else maxSize = theInventory.getInventoryStackLimit(); } - if((tempStack == null || (theInventory.isItemValidForSlot(i, this.slots[0]) && tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < maxSize)) && this.checkFilters(this.slots[0], false, isPutWhitelist)){ + if(theInventory.isItemValidForSlot(i, this.slots[0]) && (tempStack == null || (tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < maxSize)) && this.checkFilters(this.slots[0], false, isPutWhitelist)){ if(theSided != null){ for(int j = 0; j < 5; j++){ if(theSided.canInsertItem(i, this.slots[0], j)){