Exemple #1
0
  /** (abstract) Protected helper method to write subclass entity data to NBT. */
  public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeEntityToNBT(par1NBTTagCompound);
    par1NBTTagCompound.setLong("Animal ID", animalID);
    par1NBTTagCompound.setInteger("Sex", sex);
    par1NBTTagCompound.setFloat("Size Modifier", size_mod);
    par1NBTTagCompound.setInteger("Hunger", hunger);
    par1NBTTagCompound.setBoolean("Pregnant", pregnant);
    par1NBTTagCompound.setFloat("MateSize", mateSizeMod);
    par1NBTTagCompound.setLong("ConceptionTime", conception);
    for (int i = 0; i < children.size(); i++) {
      String n = "Child" + i;
      par1NBTTagCompound.setLong(n, children.get(i).animalID);
    }
    if (mate != null) {
      par1NBTTagCompound.setLong("Mate number", mate.animalID);
    } else {
      par1NBTTagCompound.setLong("Mate number", -1);
    }
    if (isChild() && parent != null) {
      par1NBTTagCompound.setLong("Parent", parent.animalID);
    } else {
      par1NBTTagCompound.setLong("Parent", -1);
    }

    par1NBTTagCompound.setLong("AdultTime", adultTime);
    par1NBTTagCompound.setLong("BirthTime", birthTime);
  }
Exemple #2
0
  /** (abstract) Protected helper method to write subclass entity data to NBT. */
  public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
    super.writeEntityToNBT(par1NBTTagCompound);

    if (this.getOwnerName() == null) {
      par1NBTTagCompound.setString("Owner", "");
    } else {
      par1NBTTagCompound.setString("Owner", this.getOwnerName());
    }

    par1NBTTagCompound.setBoolean("Sitting", this.isSitting());
  }
Exemple #3
0
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setBoolean("Sheared", this.getSheared());
   par1NBTTagCompound.setByte("Color", (byte) this.getFleeceColor());
 }
 public void writeEntityToNBT(NBTTagCompound nbttagcompound) {
   super.writeEntityToNBT(nbttagcompound);
   nbttagcompound.setInteger("CounterEntity", counterEntity);
 }
Exemple #5
0
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setBoolean("Saddle", this.getSaddled());
 }