diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/chest/TileEntityIronChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/chest/TileEntityIronChest.java index eb01208..8caf1fe 100755 --- a/src/main/java/cpw/mods/ironchest/common/tileentity/chest/TileEntityIronChest.java +++ b/src/main/java/cpw/mods/ironchest/common/tileentity/chest/TileEntityIronChest.java @@ -455,7 +455,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick this.numPlayersUsing = (type & 0xF8) >> 3; } - return true; + return super.receiveClientEvent(id, type); } @Override @@ -509,8 +509,18 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick { NBTTagCompound compound = new NBTTagCompound(); + if (!this.checkLootAndWrite(compound)) + { + ItemStackHelper.saveAllItems(compound, this.chestContents); + } + compound.setByte("facing", (byte) this.facing.ordinal()); + if (this.hasCustomName()) + { + compound.setString("CustomName", this.customName); + } + return new SPacketUpdateTileEntity(this.pos, 0, compound); } diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/shulker/TileEntityIronShulkerBox.java b/src/main/java/cpw/mods/ironchest/common/tileentity/shulker/TileEntityIronShulkerBox.java index 4525015..3730a85 100644 --- a/src/main/java/cpw/mods/ironchest/common/tileentity/shulker/TileEntityIronShulkerBox.java +++ b/src/main/java/cpw/mods/ironchest/common/tileentity/shulker/TileEntityIronShulkerBox.java @@ -618,8 +618,25 @@ public class TileEntityIronShulkerBox extends TileEntityLockableLoot implements { NBTTagCompound compound = new NBTTagCompound(); + if (!this.checkLootAndWrite(compound)) + { + ItemStackHelper.saveAllItems(compound, this.items, false); + } + + compound.setInteger("ShulkerBoxSize", this.getSizeInventory()); + compound.setByte("facing", (byte) this.facing.ordinal()); + if (this.hasCustomName()) + { + compound.setString("CustomName", this.customName); + } + + if (!compound.hasKey("Lock") && this.isLocked()) + { + this.getLockCode().toNBT(compound); + } + return new SPacketUpdateTileEntity(this.pos, 0, compound); }