Closed rmb938 closed 11 years ago
After some more testing it turns out that the minecraft pathing is very picky and depending on the angle at which the npc is walking to it will vary from 0.3-1.5. So just changing the distance requirement in DesireMoveToLocation to something like 1.5 or 1.6 should work fine.
Ok after even more testing and comparing movement to how citizens2 does it I found this.
In the class DesireMoveToLocation under shouldExecute you should be using this instead:
the f() method returns false while the entity is not at the walking to location and returns true when the entity is at the walking to location.
So I have been trying to use DesireMoveToLocation and the npc will walk to the location but will never finish the desire.
Through some debugging I have found that that distanceSquared to the location sometimes returns 1.4-1.2 which makes DesireMoveToLocation unable to finish since the path finding has stopped the npc. So either the 1.15 limit in DesireMoveToLocation has to be raised or the path finding has to be tweaked.