From 13aaec07cd4240b7623427aaba1990c013cfdaa2 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 30 Sep 2018 21:32:13 -0700 Subject: [PATCH 1/3] draw most recent node considered even if there is no valid best --- src/main/java/baritone/behavior/PathingBehavior.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index 377af7f3..c212ac5d 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -24,10 +24,11 @@ import baritone.api.event.events.PlayerUpdateEvent; import baritone.api.event.events.RenderEvent; import baritone.api.event.events.TickEvent; import baritone.api.pathing.goals.Goal; +import baritone.api.pathing.goals.GoalXZ; +import baritone.api.utils.interfaces.IGoalRenderPos; import baritone.pathing.calc.AStarPathFinder; import baritone.pathing.calc.AbstractNodeCostSearch; import baritone.pathing.calc.IPathFinder; -import baritone.api.pathing.goals.GoalXZ; import baritone.pathing.movement.MovementHelper; import baritone.pathing.path.IPath; import baritone.pathing.path.PathExecutor; @@ -35,7 +36,6 @@ import baritone.utils.BlockBreakHelper; import baritone.utils.BlockStateInterface; import baritone.utils.Helper; import baritone.utils.PathRenderer; -import baritone.api.utils.interfaces.IGoalRenderPos; import baritone.utils.pathing.BetterBlockPos; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; @@ -420,11 +420,11 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, AbstractNodeCostSearch.getCurrentlyRunning().ifPresent(currentlyRunning -> { currentlyRunning.bestPathSoFar().ifPresent(p -> { PathRenderer.drawPath(p, 0, player(), partialTicks, Baritone.settings().colorBestPathSoFar.get(), Baritone.settings().fadePath.get(), 10, 20); - currentlyRunning.pathToMostRecentNodeConsidered().ifPresent(mr -> { + }); + currentlyRunning.pathToMostRecentNodeConsidered().ifPresent(mr -> { - PathRenderer.drawPath(mr, 0, player(), partialTicks, Baritone.settings().colorMostRecentConsidered.get(), Baritone.settings().fadePath.get(), 10, 20); - PathRenderer.drawManySelectionBoxes(player(), Collections.singletonList(mr.getDest()), partialTicks, Baritone.settings().colorMostRecentConsidered.get()); - }); + PathRenderer.drawPath(mr, 0, player(), partialTicks, Baritone.settings().colorMostRecentConsidered.get(), Baritone.settings().fadePath.get(), 10, 20); + PathRenderer.drawManySelectionBoxes(player(), Collections.singletonList(mr.getDest()), partialTicks, Baritone.settings().colorMostRecentConsidered.get()); }); }); //long end = System.nanoTime(); From b1e1cc43e0327a771f5127cdcd8a3e1e0222cf58 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 30 Sep 2018 21:43:07 -0700 Subject: [PATCH 2/3] simplify properly even when obfuscated --- src/main/java/baritone/behavior/PathingBehavior.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index c212ac5d..f903dfbd 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -343,7 +343,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, // TODO simplify each individual goal in a GoalComposite if (pos != null && world().getChunk(pos) instanceof EmptyChunk) { - logDebug("Simplifying " + goal.getClass() + " to GoalXZ due to distance"); + logDebug("Simplifying " + goal.toString().split("\\{")[0] + " to GoalXZ due to distance"); goal = new GoalXZ(pos.getX(), pos.getZ()); } } From f56766be26d62ed077a7a5f04c5c74b499cbc273 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 1 Oct 2018 09:51:43 -0700 Subject: [PATCH 3/3] maybe it just needs more time --- src/main/java/baritone/utils/BaritoneAutoTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BaritoneAutoTest.java b/src/main/java/baritone/utils/BaritoneAutoTest.java index 53cd55fe..27b9bfb3 100644 --- a/src/main/java/baritone/utils/BaritoneAutoTest.java +++ b/src/main/java/baritone/utils/BaritoneAutoTest.java @@ -41,7 +41,7 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper { private static final long TEST_SEED = -928872506371745L; private static final BlockPos STARTING_POSITION = new BlockPos(0, 65, 0); private static final Goal GOAL = new GoalBlock(69, 121, 420); - private static final int MAX_TICKS = 3700; + private static final int MAX_TICKS = 4000; /** * Called right after the {@link GameSettings} object is created in the {@link Minecraft} instance.