@Override
 public void writeEntityToNBT(NBTTagCompound nbt) {
   super.writeEntityToNBT(nbt);
   nbt.setTag("SlimelingInventory", this.slimelingInventory.writeToNBT(new NBTTagList()));
   nbt.setFloat("SlimeRed", this.colorRed);
   nbt.setFloat("SlimeGreen", this.colorGreen);
   nbt.setFloat("SlimeBlue", this.colorBlue);
   nbt.setInteger("SlimelingAge", this.age);
   nbt.setString("SlimelingName", this.slimelingName);
   nbt.setInteger("FavFoodID", this.favFoodID);
   nbt.setFloat("SlimelingDamage", this.attackDamage);
   nbt.setInteger("SlimelingKills", this.kills);
 }
Exemplo n.º 2
0
  @Override
  public void writeEntityToNBT(NBTTagCompound tagCompound) {
    super.writeEntityToNBT(tagCompound);

    // Save personality
    tagCompound.setString("Personality", GsonHelper.toJson(this.personality));

    // Save parts list
    NBTTagList nbttaglist = new NBTTagList();
    for (String part : this.dataWatcher.getWatchableObjectString(18).split(",")) {
      if (part != null) nbttaglist.appendTag(new NBTTagString(part));
    }
    tagCompound.setTag("Parts", nbttaglist);
  }
  /** (abstract) Protected helper method to write subclass entity data to NBT. */
  public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeEntityToNBT(par1NBTTagCompound);

    if (this.isChild()) {
      par1NBTTagCompound.setBoolean("IsBaby", true);
    }

    if (this.isVillager()) {
      par1NBTTagCompound.setBoolean("IsVillager", true);
    }

    par1NBTTagCompound.setInteger("ConversionTime", this.isConverting() ? this.conversionTime : -1);
    par1NBTTagCompound.setBoolean("CanBreakDoors", this.func_146072_bX());
  }
Exemplo n.º 4
0
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setBoolean("Angry", this.isAngry());
   par1NBTTagCompound.setInteger("Stoneform", isStone());
 }
Exemplo n.º 5
0
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setBoolean("Angry", this.isAngry());
   par1NBTTagCompound.setString("WolfName", getName());
   par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
 }