Zombie follow Villager

Discussion in 'Plugin Development' started by MpPozor, Jan 17, 2014.

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

    MpPozor

    Hello. I know in bukkit I can do
    Code:
    zombie.setTarget(villager);
    but It works only for near villager. Can I increase the distance?
     
  2. MpPozor Extend nms.EntityZombie, set hes PathFinder to the vaule you want... Theres a tutorial by TeePee in resources section, you might want to check it...
     
    bennie3211 likes this.
  3. Offline

    bennie3211

    Like @Somone_Like_You told, you need to use nms (build against server to modify Entity bahaviour).
     
    Someone_Like_You likes this.
  4. MpPozor Also, one more thing, if youre new to programming or NMS, I would suggest you to try using RemoteEntities, since NMS isnt "easy" at all if youre a new programmer(?).
     
    Garris0n likes this.
  5. Offline

    MpPozor

    Can you send me source with one function for spawn entity (Location as argument, Zombie as returned object)? I was trying that for some hours and I couldn't do it.
     
  6. Offline

    Quackster

    Where 'double range' is the amount of blocks to search for targets.

    Code:
    public static void setFollowRange(Entity e, double range) {
    AttributeInstance attributes = ((EntityInsentient)((CraftLivingEntity)e).getHandle()).getAttributeInstance(GenericAttributes.b);
    attributes.setValue(range);
    }
     
Thread Status:
Not open for further replies.

Share This Page