Solved Zombie to Zombie Villager hook.

Discussion in 'Plugin Development' started by user_43347, Jun 4, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    user_43347

    Is there an event for this?
     
  2. Offline

    WolfClash

    I think it's EntityInteractEvent.
     
  3. Offline

    Fuzzwolf

    I think you'd have to work some magic with CreatureSpawnEvent. On zombie spawns you can cast that zombie to a NMS CraftZombie and check isVillager(). The only issue here is natural villager zombie spawns vs conversions. I don't see any zombification CreatureSpawnEvent.SpawnReason 's , but maybe this hook won't be recognized as SpawnReason.NATURAL (maybe?)
     
  4. Offline

    user_43347

    I just checked if it was a zombie then casted to the Bukkit Zombie class, it has support for villagers I guess.
     
    Fuzzwolf likes this.
Thread Status:
Not open for further replies.

Share This Page