Jump to content

sidben

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by sidben

  1. Thanks, I forked the repo, I'll look into how I can do that. I think I could achieve what I want tracking "EntityJoinWorldEvent" and "onLivingDeath" or "onUpdate", but it would be a half-assed way for what I want I'll see if I can crate a "EntityTransform(Entity old, Entity new)" hook, it could be used for other transformations like Pig -> Zombie Pigman.
  2. 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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.