diff options
Diffstat (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java')
| -rw-r--r-- | eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java index 6c0effc..35def5c 100644 --- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java +++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityDisplayer.java @@ -3,7 +3,9 @@ package darkknight.jewelrycraft.tileentity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; public class TileEntityDisplayer extends TileEntity @@ -89,4 +91,18 @@ public class TileEntityDisplayer extends TileEntity if(rotAngle < 360F) rotAngle += 6F; if(rotAngle>=360F) rotAngle = 0F; } + + public Packet getDescriptionPacket() + { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + this.writeToNBT(nbttagcompound); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbttagcompound); + } + + @Override + public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet) + { + readFromNBT(packet.func_148857_g()); + worldObj.func_147479_m(xCoord, yCoord, zCoord); + } } |
