diff --git a/common/mekanism/common/ContainerElectricPump.java b/common/mekanism/common/ContainerElectricPump.java index d829886ea..d4c26e700 100644 --- a/common/mekanism/common/ContainerElectricPump.java +++ b/common/mekanism/common/ContainerElectricPump.java @@ -114,7 +114,7 @@ public class ContainerElectricPump extends Container return null; } } - else if(slotID > 28) + else if(slotID > 29) { if(!mergeItemStack(slotStack, 3, 29, false)) { diff --git a/common/mekanism/common/TileEntityContainerBlock.java b/common/mekanism/common/TileEntityContainerBlock.java index 6047a3cb6..189307d6d 100644 --- a/common/mekanism/common/TileEntityContainerBlock.java +++ b/common/mekanism/common/TileEntityContainerBlock.java @@ -38,9 +38,9 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl NBTTagCompound tagCompound = (NBTTagCompound)tagList.tagAt(tagCount); byte slotID = tagCompound.getByte("Slot"); - if(slotID >= 0 && slotID < inventory.length) + if(slotID >= 0 && slotID < getSizeInventory()) { - inventory[slotID] = ItemStack.loadItemStackFromNBT(tagCompound); + setInventorySlotContents(slotID, ItemStack.loadItemStackFromNBT(tagCompound)); } } } @@ -52,13 +52,13 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl NBTTagList tagList = new NBTTagList(); - for(int slotCount = 0; slotCount < inventory.length; slotCount++) + for(int slotCount = 0; slotCount < getSizeInventory(); slotCount++) { - if(inventory[slotCount] != null) + if(getStackInSlot(slotCount) != null) { NBTTagCompound tagCompound = new NBTTagCompound(); tagCompound.setByte("Slot", (byte)slotCount); - inventory[slotCount].writeToNBT(tagCompound); + getStackInSlot(slotCount).writeToNBT(tagCompound); tagList.appendTag(tagCompound); } }