Solved Can't spawn a zombie villager

Discussion in 'Plugin Development' started by NortherKnight, Nov 10, 2015.

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

    NortherKnight

    I tryed using NMS and the standard bukkit API but it always spawns a normal villager
     
  2. Offline

    mcdorli

    I think zombie villager is a type of zombie, not villager.
     
  3. Offline

    Scimiguy

    EntityZombie#setVillager(Boolean) ????
     
  4. Offline

    NortherKnight

    @Scimiguy I tryed that and i know that a zombie villager is a zombie entity but it always just gives me a normal villager
    Code:
    @Override
        public boolean isVillager()
        {
            return true;
        }
      
        @Override
        public void setVillager(boolean flag)
        {
            getDataWatcher().watch(13, Byte.valueOf((byte)(1)));
        }
    or
    Code:
    Zombie z = (Zombie)e;
    z.setVillager(true);
     
  5. Offline

    Scimiguy

    Hmm... that's weird, because as far as I know, that's always worked.

    Are you using the setVillager() method after spawning the creature?
     
  6. Offline

    NortherKnight

    @Scimiguy yea

    I found the problem I registered the custom entity as a Villager(120) not as a Zombie(54) -.-. anyways guys thanks for all your help :3

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

Share This Page