Create better example action
This commit is contained in:
parent
f0488b24dd
commit
927c7f21b6
@ -28,14 +28,14 @@ public class ActionState {
|
||||
* <p>
|
||||
* TODO: Decide desiredMovement type
|
||||
*/
|
||||
protected BlockPos position;
|
||||
public BlockPos position;
|
||||
/**
|
||||
* Yaw and pitch angles that must be matched
|
||||
* <p>
|
||||
* getFirst() -> YAW
|
||||
* getSecond() -> PITCH
|
||||
*/
|
||||
protected Tuple<Float, Float> rotation;
|
||||
public Tuple<Float, Float> rotation;
|
||||
|
||||
public ActionGoal(BlockPos position, Tuple<Float, Float> rotation) {
|
||||
this.position = position;
|
||||
|
@ -1,17 +1,22 @@
|
||||
package baritone.bot.pathing.action.actions;
|
||||
|
||||
import baritone.bot.InputOverrideHandler;
|
||||
import baritone.bot.pathing.action.Action;
|
||||
import baritone.bot.pathing.action.ActionState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class ActionAscend extends Action {
|
||||
|
||||
ActionAscend(BlockPos dest) {
|
||||
public ActionAscend(BlockPos dest) {
|
||||
super(dest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionState calcState() {
|
||||
return null;
|
||||
ActionState latestState = currentState.setInput(InputOverrideHandler.Input.JUMP,true).setInput(InputOverrideHandler.Input.MOVE_FORWARD, true);
|
||||
if(player.getPosition().equals(latestState.getGoal().position))
|
||||
latestState.setStatus(ActionState.ActionStatus.SUCCESS);
|
||||
return latestState;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user