mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 22:34:21 +00:00
Minor Electric Pump container fix, cleanup
This commit is contained in:
1 parent
7f45043dec
commit
2553bb40c1
2 files changed
+6
-6
No files matched your search
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user