コード例 #1
0
ファイル: EntityAnimalTFC.java プロジェクト: shepheb/TFCraft
  /** (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);
  }
コード例 #2
0
ファイル: EntityTameable.java プロジェクト: Oron/Nightmare
  /** (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());
  }
コード例 #3
0
ファイル: EntitySheep.java プロジェクト: BrilZliaN/MCUpd
 /** (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());
 }
コード例 #4
0
 public void writeEntityToNBT(NBTTagCompound nbttagcompound) {
   super.writeEntityToNBT(nbttagcompound);
   nbttagcompound.setInteger("CounterEntity", counterEntity);
 }
コード例 #5
0
ファイル: EntityPig.java プロジェクト: timatooth/Spoutcraft
 /** (abstract) Protected helper method to write subclass entity data to NBT. */
 public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
   super.writeEntityToNBT(par1NBTTagCompound);
   par1NBTTagCompound.setBoolean("Saddle", this.getSaddled());
 }