merge
This commit is contained in:
@@ -68,6 +68,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
|||||||
CalculationContext calcContext = new CalculationContext();
|
CalculationContext calcContext = new CalculationContext();
|
||||||
HashSet<BetterBlockPos> favored = favoredPositions.orElse(null);
|
HashSet<BetterBlockPos> favored = favoredPositions.orElse(null);
|
||||||
currentlyRunning = this;
|
currentlyRunning = this;
|
||||||
|
CachedWorld world = Optional.ofNullable(WorldProvider.INSTANCE.getCurrentWorld()).map(w -> w.cache).orElse(null);
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
boolean slowPath = Baritone.settings().slowPath.get();
|
boolean slowPath = Baritone.settings().slowPath.get();
|
||||||
long timeoutTime = startTime + (slowPath ? Baritone.settings().slowPathTimeoutMS : Baritone.settings().pathTimeoutMS).<Long>get();
|
long timeoutTime = startTime + (slowPath ? Baritone.settings().slowPathTimeoutMS : Baritone.settings().pathTimeoutMS).<Long>get();
|
||||||
@@ -79,7 +80,6 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
|||||||
int pathingMaxChunkBorderFetch = Baritone.settings().pathingMaxChunkBorderFetch.get(); // grab all settings beforehand so that changing settings during pathing doesn't cause a crash or unpredictable behavior
|
int pathingMaxChunkBorderFetch = Baritone.settings().pathingMaxChunkBorderFetch.get(); // grab all settings beforehand so that changing settings during pathing doesn't cause a crash or unpredictable behavior
|
||||||
double favorCoeff = Baritone.settings().backtrackCostFavoringCoefficient.get();
|
double favorCoeff = Baritone.settings().backtrackCostFavoringCoefficient.get();
|
||||||
boolean minimumImprovementRepropagation = Baritone.settings().minimumImprovementRepropagation.get();
|
boolean minimumImprovementRepropagation = Baritone.settings().minimumImprovementRepropagation.get();
|
||||||
CachedWorld world=Optional.ofNullable(WorldProvider.INSTANCE.getCurrentWorld()).map(w->w.cache).orElse(null);
|
|
||||||
HashMap<Class<? extends Movement>, Long> timeConsumed = new HashMap<>();
|
HashMap<Class<? extends Movement>, Long> timeConsumed = new HashMap<>();
|
||||||
HashMap<Class<? extends Movement>, Integer> count = new HashMap<>();
|
HashMap<Class<? extends Movement>, Integer> count = new HashMap<>();
|
||||||
long heapRemove=0;
|
long heapRemove=0;
|
||||||
@@ -135,7 +135,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
|||||||
long s=System.nanoTime();
|
long s=System.nanoTime();
|
||||||
boolean isPositionCached = false;
|
boolean isPositionCached = false;
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
if (world.isCached(dest)){
|
if (world.isCached(dest)) {
|
||||||
isPositionCached = true;
|
isPositionCached = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user