Hello, I'm working on a mod to add small tweaks to the game, one of those would be to give a villager a special trade when he is cured from being a zombie.
I figured out that the best place for my code would be inside the "EntityZombie.convertToVillager()" method, but I did not find any hooks for it.
protected void convertToVillager()
{
EntityVillager entityvillager = new EntityVillager(this.worldObj);
entityvillager.copyLocationAndAnglesFrom(this);
entityvillager.func_110161_a((EntityLivingData)null);
entityvillager.func_82187_q();
if (this.isChild())
{
entityvillager.setGrowingAge(-24000);
}
// HERE IS WHERE I WOULD LIKE MY CODE
this.worldObj.removeEntity(this);
this.worldObj.spawnEntityInWorld(entityvillager);
entityvillager.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 0));
this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1017, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
}
Does anyone know of a hook I could use?
Thanks