fix path canceling at edge of loaded chunks hopefully

This commit is contained in:
Leijurv 2019-06-24 10:43:49 -07:00
parent ce3d3bb244
commit f4d2ea7923
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 5 additions and 0 deletions

View File

@ -188,6 +188,11 @@ public class PathExecutor implements IPathExecutor, Helper {
System.out.println("Recalculating break and place took " + (end - start) + "ms");
}*/
IMovement movement = path.movements().get(pathPosition);
if (!behavior.baritone.bsi.worldContainsLoadedChunk(movement.getDest().x, movement.getDest().z)) {
logDebug("Pausing since destination is at edge of loaded chunks");
clearKeys();
return true;
}
boolean canCancel = movement.safeToCancel();
if (costEstimateIndex == null || costEstimateIndex != pathPosition) {
costEstimateIndex = pathPosition;