Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void writeCustomNBT(NBTTagCompound tag)
- {
- face = ForgeDirection.getOrientation(this.getBlockMetadata());
- tag.setInteger("face", this.face.ordinal());
- tag.setInteger("amount", amount);
- }
- public void readCustomNBT(NBTTagCompound tag)
- {
- face = ForgeDirection.getOrientation(this.getBlockMetadata());
- this.face = ForgeDirection.getOrientation(tag.getInteger("face"));
- this.amount = tag.getInteger("amount");
- }
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
- readFromNBT(pkt.func_148857_g());
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- }
- @Override
- public Packet getDescriptionPacket() {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- this.writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbttagcompound);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement