summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
diff options
context:
space:
mode:
Diffstat (limited to 'common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java')
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
index 74e681b..c46d7e3 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
@@ -86,16 +86,19 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
}
@Override
- public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
+ public Packet getDescriptionPacket()
{
- readFromNBT(pkt.data);
+ Packet132TileEntityData packet = (Packet132TileEntityData) super.getDescriptionPacket();
+ NBTTagCompound dataTag = packet != null ? packet.data : new NBTTagCompound();
+ writeToNBT(dataTag);
+ return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, dataTag);
}
-
+
@Override
- public Packet getDescriptionPacket()
+ public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
{
- NBTTagCompound nbtTag = new NBTTagCompound();
- this.writeToNBT(nbtTag);
- return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag);
+ super.onDataPacket(net, pkt);
+ NBTTagCompound tag = pkt != null ? pkt.data : new NBTTagCompound();
+ readFromNBT(tag);
}
}