From f4d2ea7923b0422943040d30066860af1dc25f6f Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 24 Jun 2019 10:43:49 -0700 Subject: [PATCH] fix path canceling at edge of loaded chunks hopefully --- src/main/java/baritone/pathing/path/PathExecutor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index d219dfc2..7b9ba9ee 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -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;