Skip to content

Commit 561a4d2

Browse files
authored
Merge pull request cabaletta#4728 from ZacSharp/pr/1.21.4/elytra/fixTakeoff
Fix elytra takeoff on 1.21.4
2 parents c630969 + d927cc7 commit 561a4d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/baritone/process/ElytraProcess.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel) {
254254

255255
if (this.state == State.GET_TO_JUMP) {
256256
final IPathExecutor executor = baritone.getPathingBehavior().getCurrent();
257-
final boolean canStartFlying = ctx.player().fallDistance > 1.0f
257+
// TODO 1.21.5: replace `ctx.player().getDeltaMovement().y < -0.377` with `ctx.player().fallDistance > 1.0f`
258+
final boolean canStartFlying = ctx.player().getDeltaMovement().y < -0.377
258259
&& !isSafeToCancel
259260
&& executor != null
260261
&& executor.getPath().movements().get(executor.getPosition()) instanceof MovementFall;
@@ -272,7 +273,8 @@ public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel) {
272273
baritone.getPathingBehavior().secretInternalSegmentCancel();
273274
}
274275
baritone.getInputOverrideHandler().clearAllKeys();
275-
if (ctx.player().fallDistance > 1.0f) {
276+
// TODO 1.21.5: replace `ctx.player().getDeltaMovement().y < -0.377` with `ctx.player().fallDistance > 1.0f`
277+
if (ctx.player().getDeltaMovement().y < -0.377) {
276278
baritone.getInputOverrideHandler().setInputForceState(Input.JUMP, true);
277279
}
278280
}

0 commit comments

Comments
 (0)