001 package net.minecraft.src; 002 003 public class TileEntityRecordPlayer extends TileEntity 004 { 005 /** ID of record which is in Jukebox */ 006 public int record; 007 008 /** 009 * Reads a tile entity from NBT. 010 */ 011 public void readFromNBT(NBTTagCompound par1NBTTagCompound) 012 { 013 super.readFromNBT(par1NBTTagCompound); 014 this.record = par1NBTTagCompound.getInteger("Record"); 015 } 016 017 /** 018 * Writes a tile entity to NBT. 019 */ 020 public void writeToNBT(NBTTagCompound par1NBTTagCompound) 021 { 022 super.writeToNBT(par1NBTTagCompound); 023 024 if (this.record > 0) 025 { 026 par1NBTTagCompound.setInteger("Record", this.record); 027 } 028 } 029 }