From d60e0ced6786105c12769b301b60209f445c58d1 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sat, 18 Aug 2018 12:33:00 -0700 Subject: [PATCH] sigh --- src/main/java/baritone/bot/pathing/movement/Movement.java | 3 +++ .../bot/pathing/movement/movements/MovementAscend.java | 1 + .../bot/pathing/movement/movements/MovementDiagonal.java | 1 + .../bot/pathing/movement/movements/MovementDownward.java | 1 + .../bot/pathing/movement/movements/MovementPillar.java | 1 + .../bot/pathing/movement/movements/MovementTraverse.java | 1 + 6 files changed, 8 insertions(+) diff --git a/src/main/java/baritone/bot/pathing/movement/Movement.java b/src/main/java/baritone/bot/pathing/movement/Movement.java index 3c234b70..f2001dc7 100644 --- a/src/main/java/baritone/bot/pathing/movement/Movement.java +++ b/src/main/java/baritone/bot/pathing/movement/Movement.java @@ -124,6 +124,9 @@ public abstract class Movement implements Helper, MovementHelper { } protected boolean prepared(MovementState state) { + if (state.getStatus() == MovementStatus.WAITING) { + return true; + } boolean somethingInTheWay = false; for (BlockPos blockPos : positionsToBreak) { if (!MovementHelper.canWalkThrough(blockPos)) { diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java index 19736ad3..5fc408aa 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java @@ -119,6 +119,7 @@ public class MovementAscend extends Movement { // for efficiency in ascending minimal height staircases, which is just repeated MovementAscend, so that it doesn't bonk its head on the ceiling repeatedly) switch (state.getStatus()) { case WAITING: + state.setStatus(MovementStatus.RUNNING); case RUNNING: break; default: diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java index 468958f8..84d18da5 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementDiagonal.java @@ -52,6 +52,7 @@ public class MovementDiagonal extends Movement { super.updateState(state); switch (state.getStatus()) { case WAITING: + state.setStatus(MovementState.MovementStatus.RUNNING); case RUNNING: break; default: diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementDownward.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementDownward.java index 3f5b64ab..dcf33028 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementDownward.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementDownward.java @@ -56,6 +56,7 @@ public class MovementDownward extends Movement { super.updateState(state); switch (state.getStatus()) { case WAITING: + state.setStatus(MovementState.MovementStatus.RUNNING); case RUNNING: break; default: diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementPillar.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementPillar.java index c31dfab5..bcc23fdc 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementPillar.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementPillar.java @@ -103,6 +103,7 @@ public class MovementPillar extends Movement { super.updateState(state); switch (state.getStatus()) { case WAITING: + state.setStatus(MovementState.MovementStatus.RUNNING); case RUNNING: break; default: diff --git a/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java b/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java index 33123372..44182a97 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java @@ -127,6 +127,7 @@ public class MovementTraverse extends Movement { super.updateState(state); switch (state.getStatus()) { case WAITING: + state.setStatus(MovementState.MovementStatus.RUNNING); case RUNNING: break; default: