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 ecdb413d..a5da2b97 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementAscend.java @@ -7,9 +7,12 @@ import baritone.bot.pathing.movement.MovementState; import baritone.bot.pathing.movement.MovementState.MovementStatus; import baritone.bot.utils.BlockStateInterface; import baritone.bot.utils.ToolSet; +import baritone.bot.utils.Utils; import net.minecraft.block.BlockFalling; import net.minecraft.util.math.BlockPos; +import java.util.Optional; + public class MovementAscend extends Movement { BlockPos[] against = new BlockPos[3]; @@ -58,14 +61,11 @@ public class MovementAscend extends Movement { return WALK_ONE_BLOCK_COST / 2 + Math.max(JUMP_ONE_BLOCK_COST, WALK_ONE_BLOCK_COST / 2) + getTotalHardnessOfBlocksToBreak(ts);//we walk half the block to get to the edge, then we walk the other half while simultaneously jumping (math.max because of how it's in parallel) } - @Override - public void onFinish() { - - } - @Override public MovementState updateState(MovementState state) { + super.updateState(state); + System.out.println("Ticking with state " + state.getStatus()); switch (state.getStatus()) { case PREPPING: case UNREACHABLE: @@ -73,6 +73,8 @@ public class MovementAscend extends Movement { return state; case WAITING: case RUNNING: + state.setTarget(new MovementState.MovementTarget(Optional.empty(), Optional.of(Utils.calcRotationFromCoords(playerFeet(), positionsToBreak[0])))); + MovementState latestState = state.setInput(InputOverrideHandler.Input.JUMP, true).setInput(InputOverrideHandler.Input.MOVE_FORWARD, true); if (playerFeet().equals(dest)) latestState.setStatus(MovementStatus.SUCCESS); 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 7094db42..9e7865a5 100644 --- a/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java +++ b/src/main/java/baritone/bot/pathing/movement/movements/MovementTraverse.java @@ -81,14 +81,11 @@ public class MovementTraverse extends Movement { } } - @Override - public void onFinish() { - - } - @Override public MovementState updateState(MovementState state) { super.updateState(state); + System.out.println("Ticking with state " + state.getStatus()); + System.out.println(state.getTarget().rotation); switch (state.getStatus()) { case PREPPING: case UNREACHABLE: