Update status when movement is prepared

This commit is contained in:
Howard Stark 2018-08-05 21:00:36 -04:00
parent e9fedef203
commit fedbe724ef
No known key found for this signature in database
GPG Key ID: 9FA4E350B33067F3

View File

@ -43,9 +43,6 @@ public abstract class Movement implements Helper, MovementHelper {
protected Movement(BlockPos src, BlockPos dest, BlockPos[] toBreak, BlockPos[] toPlace, Vec3d rotationTarget) {
this(src, dest, toBreak, toPlace);
// currentState = new MovementState()
// .setGoal(new )
// .setStatus(MovementStatus.WAITING);
}
public double getCost(ToolSet ts) {
@ -172,11 +169,11 @@ public abstract class Movement implements Helper, MovementHelper {
* @return
*/
public MovementState updateState(MovementState state) {
if (!prepared(state))
return state.setStatus(MovementStatus.PREPPING);
else if (state.getStatus() == MovementStatus.PREPPING) {
state.setInput(Input.CLICK_LEFT, false);
state.setStatus(MovementStatus.WAITING);
}
return state;
}