Solved EntityInsentient.getNavigation() not working

Discussion in 'Plugin Development' started by Niv-Mizzet, Aug 20, 2020.

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


    Hi there everyone.
    So basically what is happening is that I want to override the pathfinding until they reach the destination and then resume it, but instead what happens is that(Unless they do not have a target) they turn for a split second and then resume their normal targeting. Does anyone know how to fix it? getPlayerEntities just gets all the entities associated with a player. et is an NMS entity.
           for(Entity et:getPlayerEntities(p)){
              EntityInsentient ei= (EntityInsentient) et;
                ei.getNavigation().a(loc.getBlockX(), p.getLocation().getBlockY(), loc.getBlockZ(), ((CraftLivingEntity)et.getBukkitEntity()).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getDefaultValue());
Thread Status:
Not open for further replies.

Share This Page