remove all that crap lol

This commit is contained in:
Leijurv 2019-01-10 18:21:02 -08:00
parent f727e71eaf
commit 1ad6a0d5b5
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 2 additions and 37 deletions

View File

@ -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()) {

View File

@ -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<Input, Boolean> 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<Input, Boolean> getInputStates() {
return this.inputState;
}
public static class MovementTarget {
/**
* Necessary movement to achieve
* <p>
* 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<Vec3d> getPosition() {
return Optional.ofNullable(this.position);
}
public final Optional<Rotation> getRotation() {
return Optional.ofNullable(this.rotation);
}