From a4495ce80abc80951087a7466cb375f49f8ddb5f Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 8 Jan 2019 22:00:33 -0800 Subject: [PATCH] tweaks --- .../java/baritone/utils/PathingControlManager.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/baritone/utils/PathingControlManager.java b/src/main/java/baritone/utils/PathingControlManager.java index 32788433..d1cb4f61 100644 --- a/src/main/java/baritone/utils/PathingControlManager.java +++ b/src/main/java/baritone/utils/PathingControlManager.java @@ -26,10 +26,10 @@ import baritone.api.process.IBaritoneProcess; import baritone.api.process.PathingCommand; import baritone.behavior.PathingBehavior; import baritone.pathing.path.PathExecutor; -import java.util.stream.Stream; import net.minecraft.util.math.BlockPos; import java.util.*; +import java.util.stream.Stream; public class PathingControlManager implements IPathingControlManager { private final Baritone baritone; @@ -82,7 +82,7 @@ public class PathingControlManager implements IPathingControlManager { public void preTick() { inControlLastTick = inControlThisTick; - command = doTheStuff(); + command = executeProcesses(); if (command == null) { return; } @@ -169,14 +169,14 @@ public class PathingControlManager implements IPathingControlManager { } - public PathingCommand doTheStuff() { + public PathingCommand executeProcesses() { Stream inContention = processes.stream() - .filter(IBaritoneProcess::isActive) - .sorted(Comparator.comparingDouble(IBaritoneProcess::priority).reversed()); + .filter(IBaritoneProcess::isActive) + .sorted(Comparator.comparingDouble(IBaritoneProcess::priority).reversed()); Iterator iterator = inContention.iterator(); - while(iterator.hasNext()) { + while (iterator.hasNext()) { IBaritoneProcess proc = iterator.next(); PathingCommand exec = proc.onTick(Objects.equals(proc, inControlLastTick) && baritone.getPathingBehavior().calcFailedLastTick(), baritone.getPathingBehavior().isSafeToCancel()); @@ -190,7 +190,6 @@ public class PathingControlManager implements IPathingControlManager { if (!proc.isTemporary()) { iterator.forEachRemaining(IBaritoneProcess::onLostControl); } - return exec; } }