diff --git a/src/main/java/baritone/pathing/movement/Movement.java b/src/main/java/baritone/pathing/movement/Movement.java index 2db8bf8d..ce78c231 100644 --- a/src/main/java/baritone/pathing/movement/Movement.java +++ b/src/main/java/baritone/pathing/movement/Movement.java @@ -127,7 +127,7 @@ public abstract class Movement implements IMovement, MovementHelper { currentState.getInputStates().forEach((input, forced) -> { baritone.getInputOverrideHandler().setInputForceState(input, forced); }); - currentState.getInputStates().replaceAll((input, forced) -> false); + currentState.getInputStates().clear(); // If the current status indicates a completed movement if (currentState.getStatus().isComplete()) { diff --git a/src/main/java/baritone/pathing/movement/MovementState.java b/src/main/java/baritone/pathing/movement/MovementState.java index 4432c503..73539698 100644 --- a/src/main/java/baritone/pathing/movement/MovementState.java +++ b/src/main/java/baritone/pathing/movement/MovementState.java @@ -20,7 +20,6 @@ package baritone.pathing.movement; import baritone.api.pathing.movement.MovementStatus; import baritone.api.utils.Rotation; import baritone.api.utils.input.Input; -import net.minecraft.util.math.Vec3d; import java.util.HashMap; import java.util.Map; @@ -29,7 +28,6 @@ import java.util.Optional; public class MovementState { private MovementStatus status; - private MovementTarget goal = new MovementTarget(); private MovementTarget target = new MovementTarget(); private final Map inputState = new HashMap<>(); @@ -42,15 +40,6 @@ public class MovementState { return status; } - public MovementTarget getGoal() { - return this.goal; - } - - public MovementState setGoal(MovementTarget goal) { - this.goal = goal; - return this; - } - public MovementTarget getTarget() { return this.target; } @@ -65,23 +54,12 @@ public class MovementState { return this; } - public boolean getInput(Input input) { - return this.inputState.getOrDefault(input, false); - } - public Map getInputStates() { return this.inputState; } public static class MovementTarget { - /** - * Necessary movement to achieve - *

- * TODO: Decide desiredMovement type - */ - public Vec3d position; - /** * Yaw and pitch angles that must be matched */ @@ -95,27 +73,14 @@ public class MovementState { private boolean forceRotations; public MovementTarget() { - this(null, null, false); - } - - public MovementTarget(Vec3d position) { - this(position, null, false); + this(null, false); } public MovementTarget(Rotation rotation, boolean forceRotations) { - this(null, rotation, forceRotations); - } - - public MovementTarget(Vec3d position, Rotation rotation, boolean forceRotations) { - this.position = position; this.rotation = rotation; this.forceRotations = forceRotations; } - public final Optional getPosition() { - return Optional.ofNullable(this.position); - } - public final Optional getRotation() { return Optional.ofNullable(this.rotation); }