From cdd101d39599aeab6363047f344c53da6e3c2ced Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 10 Aug 2015 12:51:13 +0200 Subject: [PATCH] Fixed the ESD ignoring setInventorySlotContents() --- .../tile/TileEntityInputter.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java index 8a2dbf881..8454004c7 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java @@ -261,14 +261,17 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt } if(can){ if(theStack != null){ - if(theStack.isItemEqual(this.slots[0])){ - if(this.slots[0].stackSize <= maxSize - theStack.stackSize){ - theStack.stackSize += this.slots[0].stackSize; + ItemStack copiedStack = theStack.copy(); + if(copiedStack.isItemEqual(this.slots[0])){ + if(this.slots[0].stackSize <= maxSize - copiedStack.stackSize){ + copiedStack.stackSize += this.slots[0].stackSize; this.slots[0] = null; + theInventory.setInventorySlotContents(theSlotToPut, copiedStack); } - else if(this.slots[0].stackSize > maxSize - theStack.stackSize){ - this.decrStackSize(0, maxSize - theStack.stackSize); - theStack.stackSize = maxSize; + else if(this.slots[0].stackSize > maxSize - copiedStack.stackSize){ + this.decrStackSize(0, maxSize - copiedStack.stackSize); + copiedStack.stackSize = maxSize; + theInventory.setInventorySlotContents(theSlotToPut, copiedStack); } } }