Exemplo n.º 1
0
 @Override
 public void writeEntityToNBT(NBTTagCompound nbt) {
   super.writeEntityToNBT(nbt);
   nbt.setString("Name", getName());
   nbt.setString("Model", dataWatcher.getWatchableObjectString(4));
   if (npcLocation == null) npcLocation = SpawnLocation.Land;
   nbt.setInteger("trainerLocation", npcLocation.index);
 }
Exemplo n.º 2
0
 @Override
 public void writeEntityToNBT(NBTTagCompound nbt) {
   super.writeEntityToNBT(nbt);
   nbt.setInteger("spiderType", spiderType.getId());
   nbt.setInteger("abilityCounter", abilityCounter);
   nbt.setInteger("abilityThreshold", abilityThreshold);
   nbt.setInteger("killsUntilLevelUp", killsUntilLevelUp);
   nbt.setLong("ownerMSB", owner.getMostSignificantBits());
   nbt.setLong("ownerLSB", owner.getLeastSignificantBits());
   nbt.setTag("inventory", inventory.saveInventoryToNBT());
 }
Exemplo n.º 3
0
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setInteger("Age", this.getGrowingAge());
 }