Closed rmb938 closed 11 years ago
You made that line way longer than you need. To get the entity handle you could just do this.getEntityHandle() and done. Secondly, I'm not really sure if that wouldn't end in an infinite loop. Because in the update method it resets the path, which is, after a second though, not really good, so I'll probably remove it anyway. Last thing is that using your method, it would not work if it is already moving which is bad, since .f() checks if the entity has no path.
I see what you're aiming for, but the execution is not quite right.
Your fix works but there is one other issue that may or may not have been there before. When the location that it is trying to walk to is outside of its path finding range DesireMoveToLocation never finishes. Should be easy enough to fix. Also sorry with all the issues, just switched from Citizens2 and just trying to convert my existing code.
Also do you mind adding two methods to get and set the pathfinding range from a RemoteEntity
I'll add something which makes it possible, just give me some time.
The distanceSquared can sometimes be greater then 1.15 so using the minecraft navigation f() method fixes this issue.