wasliebob

Ra

Apr 13th, 2014
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Override
  2. public void writeToNBT(NBTTagCompound nbt)
  3. {
  4. super.writeToNBT(nbt);
  5. nbt.setInteger(ENERGY, getEnergy());
  6. }
  7.  
  8. @Override
  9. public void readFromNBT(NBTTagCompound nbt)
  10. {
  11. super.readFromNBT(nbt);
  12. setEnergy(nbt.getInteger(ENERGY));
  13. }
  14.  
  15. @Override
  16. public Packet getDescriptionPacket() {
  17. NBTTagCompound tagCompound = new NBTTagCompound();
  18. writeToNBT(tagCompound);
  19.  
  20. return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, tagCompound);
  21. }
  22.  
  23. @Override
  24. public void onDataPacket(NetworkManager networkManager, S35PacketUpdateTileEntity packet) {
  25. this.readFromNBT(packet.func_148857_g());
  26. }
Advertisement
Add Comment
Please, Sign In to add comment