Solved Spawning Adult, non Villager Zombies

Discussion in 'Plugin Development' started by ThePixelPony, Sep 1, 2014.

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

    ThePixelPony

    So I'd like to spawn a zombie but to make sure it's not a villager zombie or a baby zombie.

    Monster m = (Monster) l.getWorld().spawnEntity(l, EntityType.valueOf("ZOMBIE"));

    This is my code. How could I make sure it's an ordinary adult zombie?

    Never mind. I found it.
    ((Zombie) m).setBaby(false);
    ((Zombie) m).setVillager(false);

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
Thread Status:
Not open for further replies.

Share This Page