/** (abstract) Protected helper method to read subclass entity data from NBT. */
  public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
    super.readEntityFromNBT(par1NBTTagCompound);
    this.setProfession(par1NBTTagCompound.getInteger("Profession"));
    this.wealth = par1NBTTagCompound.getInteger("Riches");

    if (par1NBTTagCompound.hasKey("Offers")) {
      NBTTagCompound nbttagcompound1 = par1NBTTagCompound.getCompoundTag("Offers");
      this.buyingList = new MerchantRecipeList(nbttagcompound1);
    }
  }
Example #2
0
 /** (abstract) Protected helper method to read subclass entity data from NBT. */
 public void readEntityFromNBT(NBTTagCompound tagCompund) {
   super.readEntityFromNBT(tagCompund);
   this.inLove = tagCompund.getInteger("InLove");
 }