Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //to send: MinecraftServer.getServer().getConfigurationManager().sendPacketToAllPlayers(this.getDescriptionPacket());
- public void readFromNBT(NBTTagCompound par1NBTTagCompound)
- {
- super.readFromNBT(par1NBTTagCompound);
- this.itemIndex = par1NBTTagCompound.getInteger("itemIndex");
- this.cycleCurDelay = par1NBTTagCompound.getInteger("cycleCurDelay");
- cycleItems = par1NBTTagCompound.getBoolean("cycleItems");
- //this.delay = par1NBTTagCompound.getShort("Delay");
- }
- /**
- * Writes a tile entity to NBT.
- */
- public void writeToNBT(NBTTagCompound par1NBTTagCompound)
- {
- super.writeToNBT(par1NBTTagCompound);
- par1NBTTagCompound.setInteger("itemIndex", this.itemIndex);
- par1NBTTagCompound.setInteger("cycleCurDelay", this.cycleCurDelay);
- par1NBTTagCompound.setBoolean("cycleItems", cycleItems);
- //par1NBTTagCompound.setShort("Delay", (short)this.delay);
- }
- @Override
- public void onDataPacket(NetworkManager net, Packet132TileEntityData pkt) {
- this.readFromNBT(pkt.customParam1);
- }
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound var1 = new NBTTagCompound();
- this.writeToNBT(var1);
- return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 0, var1);
- }
Advertisement
Add Comment
Please, Sign In to add comment