Solved Entity move

Discussion in 'Spigot Plugin Development' started by patricianko, May 28, 2018.

  1. Hey, i have question is here some possible way how to do configurable entity path finding like on this video?

    I tried already too much codes for this so still works only on 15+ blocks this way is bad.
    Code (Text):
    final EntityVillager nmsVillager = ((CraftVillager) a).getHandle();
    nmsVillager.getNavigation().a(target.getX(), target.getY(), target.getZ(), 0.6F);


    If you know some solution you can do code here.
     
  2. You have to define your own pathfinding goals in order to have a custom path finding. Please look at spigot's source code for reference.
     
  3. google a* pathfinding is rather easy to implement. There is also several videos on youtube explaining in detail how it works.
    once you have the path finder you can use minecrafts built in path finder to pathfind to each node on your path. or (more complicated) make your own entity navigator to move the entity