How can i increase the range a mob can see you from

Discussion in 'Plugin Development' started by SoThatsIt, Dec 18, 2012.

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

    SoThatsIt

    how would i go about making a custom mob be able to spot and track you from over 16 blocks away (to be specific 128 blocks). i have tried adding a target selector in the config of the zombie but that hasn't worked. i used this to add the target selector this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 128.0F, 0, true));. i have also tried over-riding the findTarget method, but that hasn't worked either.
    Code:
    @Override
        protected Entity findTarget() {
            EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 128.0D);
     
            return entityhuman != null && this.n(entityhuman) ? entityhuman : null;
        }
     
  2. Offline

    bobacadodl

    You should probably try creating a custom mob by extending the entity

    http://forums.bukkit.org/threads/tutorial-intermediate-custom-entities-meteor.93899/

    This isn't easy

    Sorry, I didn't read the post -.-
     
  3. Offline

    SoThatsIt

    didn't you read the post?

    i have a custom zombie i just need to make it see the player at a farther range.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  4. Offline

    bobacadodl

    Sorry o_o
     
  5. Offline

    SirTyler

    SoThatsIt You need to override that method as well as its AI AND Navigation
     
Thread Status:
Not open for further replies.

Share This Page