/** Writes a tile entity to NBT. */
  public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setString("EntityId", mobID);
    par1NBTTagCompound.setShort("Delay", (short) delay);
    par1NBTTagCompound.setShort("MinSpawnDelay", (short) field_70388_f);
    par1NBTTagCompound.setShort("MaxSpawnDelay", (short) field_70389_g);
    par1NBTTagCompound.setShort("SpawnCount", (short) field_70395_h);

    if (field_70391_e != null) {
      par1NBTTagCompound.setCompoundTag("SpawnData", field_70391_e);
    }
  }
 public void writeEntityToNBT(NBTTagCompound nbttagcompound) {
   super.writeEntityToNBT(nbttagcompound);
   nbttagcompound.setTag("Inventory", inventory.writeToNBT(new NBTTagList()));
   nbttagcompound.setInteger("Dimension", dimension);
   nbttagcompound.setBoolean("Sleeping", sleeping);
   nbttagcompound.setShort("SleepTimer", (short) sleepTimer);
   nbttagcompound.setFloat("XpP", currentXP);
   nbttagcompound.setInteger("XpLevel", playerLevel);
   nbttagcompound.setInteger("XpTotal", totalXP);
   if (playerSpawnCoordinate != null) {
     nbttagcompound.setInteger("SpawnX", playerSpawnCoordinate.posX);
     nbttagcompound.setInteger("SpawnY", playerSpawnCoordinate.posY);
     nbttagcompound.setInteger("SpawnZ", playerSpawnCoordinate.posZ);
   }
   foodStats.writeStatsToNBT(nbttagcompound);
   capabilities.writeCapabilitiesToNBT(nbttagcompound);
 }