Set safeToCancel to false while flying

This commit is contained in:
Brady
2023-07-06 19:31:37 -07:00
parent aeeb001205
commit c4ac23837f
2 changed files with 7 additions and 0 deletions

View File

@@ -1208,6 +1208,10 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
}
}
public boolean isSafeToCancel() {
return !this.isActive() || !(this.process.state == State.FLYING || this.process.state == State.START_FLYING);
}
private final class ElytraProcess implements IBaritoneProcess {
private State state;

View File

@@ -148,6 +148,9 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
}
}
if (current == null) {
if (baritone.getElytraBehavior().isActive()) {
safeToCancel = baritone.getElytraBehavior().isSafeToCancel();
}
return;
}
safeToCancel = current.onTick();