Solved Infected Zombie Entity

Discussion in 'Plugin Development' started by cnaude, Nov 15, 2012.

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

    cnaude

    Anyone know how to detect if a zombie is actually an infected villager? I've been looking at the javadocs and I don't see anything specific to infected villagers.
     
  2. Offline

    bryce325

    I doubt it, I would assume that where the villager died a zombie spawns.
    Don't quote me as I am only guessing :s
     
  3. Offline

    fireblast709

    call EntityZombie's setVillager() method might do the trick. Assume Zombie z:
    Code:java
    1. ((CraftZombie)z).getHandle().setVillager(true/false);

    Untested
     
  4. Offline

    Deleted user

    Just use onEntityDeathEvent check to see if the Entitiy is a villager and then check to see if it was killed by a zombie, eh? :3
     
  5. Offline

    cnaude

    I will give this a try. Thanks!

    Edit: It works!
     
Thread Status:
Not open for further replies.

Share This Page