remove all that crap lol
This commit is contained in:
parent
f727e71eaf
commit
1ad6a0d5b5
@ -127,7 +127,7 @@ public abstract class Movement implements IMovement, MovementHelper {
|
|||||||
currentState.getInputStates().forEach((input, forced) -> {
|
currentState.getInputStates().forEach((input, forced) -> {
|
||||||
baritone.getInputOverrideHandler().setInputForceState(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 the current status indicates a completed movement
|
||||||
if (currentState.getStatus().isComplete()) {
|
if (currentState.getStatus().isComplete()) {
|
||||||
|
@ -20,7 +20,6 @@ package baritone.pathing.movement;
|
|||||||
import baritone.api.pathing.movement.MovementStatus;
|
import baritone.api.pathing.movement.MovementStatus;
|
||||||
import baritone.api.utils.Rotation;
|
import baritone.api.utils.Rotation;
|
||||||
import baritone.api.utils.input.Input;
|
import baritone.api.utils.input.Input;
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -29,7 +28,6 @@ import java.util.Optional;
|
|||||||
public class MovementState {
|
public class MovementState {
|
||||||
|
|
||||||
private MovementStatus status;
|
private MovementStatus status;
|
||||||
private MovementTarget goal = new MovementTarget();
|
|
||||||
private MovementTarget target = new MovementTarget();
|
private MovementTarget target = new MovementTarget();
|
||||||
private final Map<Input, Boolean> inputState = new HashMap<>();
|
private final Map<Input, Boolean> inputState = new HashMap<>();
|
||||||
|
|
||||||
@ -42,15 +40,6 @@ public class MovementState {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MovementTarget getGoal() {
|
|
||||||
return this.goal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MovementState setGoal(MovementTarget goal) {
|
|
||||||
this.goal = goal;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MovementTarget getTarget() {
|
public MovementTarget getTarget() {
|
||||||
return this.target;
|
return this.target;
|
||||||
}
|
}
|
||||||
@ -65,23 +54,12 @@ public class MovementState {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getInput(Input input) {
|
|
||||||
return this.inputState.getOrDefault(input, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<Input, Boolean> getInputStates() {
|
public Map<Input, Boolean> getInputStates() {
|
||||||
return this.inputState;
|
return this.inputState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MovementTarget {
|
public static class MovementTarget {
|
||||||
|
|
||||||
/**
|
|
||||||
* Necessary movement to achieve
|
|
||||||
* <p>
|
|
||||||
* TODO: Decide desiredMovement type
|
|
||||||
*/
|
|
||||||
public Vec3d position;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Yaw and pitch angles that must be matched
|
* Yaw and pitch angles that must be matched
|
||||||
*/
|
*/
|
||||||
@ -95,27 +73,14 @@ public class MovementState {
|
|||||||
private boolean forceRotations;
|
private boolean forceRotations;
|
||||||
|
|
||||||
public MovementTarget() {
|
public MovementTarget() {
|
||||||
this(null, null, false);
|
this(null, false);
|
||||||
}
|
|
||||||
|
|
||||||
public MovementTarget(Vec3d position) {
|
|
||||||
this(position, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MovementTarget(Rotation rotation, boolean forceRotations) {
|
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.rotation = rotation;
|
||||||
this.forceRotations = forceRotations;
|
this.forceRotations = forceRotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Optional<Vec3d> getPosition() {
|
|
||||||
return Optional.ofNullable(this.position);
|
|
||||||
}
|
|
||||||
|
|
||||||
public final Optional<Rotation> getRotation() {
|
public final Optional<Rotation> getRotation() {
|
||||||
return Optional.ofNullable(this.rotation);
|
return Optional.ofNullable(this.rotation);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user