[PR #1104] [MERGED] Elytra: a landing glide lasts one more tick, so elytra hops keep their speed #3050

Closed
opened 2026-11-02 16:01:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1104
Author: @ludovic111
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @ludovic111

Base: main ← Head: fix/elytra-hop


📝 Commits (1)

  • 8b0872f Elytra: a landing glide lasts one more tick, so hops keep their speed

📊 Changes

1 file changed (+53 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/motion.rs (+53 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #1056. Reported by Visivel on Discord: thanks!

What

Elytra hopping works: glide, touch the ground, jump and glide again, and the speed is kept (each sprinting jump adds its boost).

Why

The glide flag is the server's. LivingEntity.updateFallFlying clears it on the server when canGlide fails (the player is on the ground), from the position the client sent that tick, and the client gets the cleared flag on its next tick, before aiStep. So in vanilla a glide that lands goes on for one tick on the ground: travelFallFlying's drag instead of ground friction, and a jump on that tick (with the sprint boost) keeps the speed. Horizon ended the glide on the landing tick, so every hop lost about half of its speed to ground friction.

How

motion.rs: glide_ending marks the glide the server ended; the flag clears at the start of the next tick, before the glide can start again. New test a_landing_glide_lasts_a_tick_so_a_jump_keeps_its_speed (fails without the fix).
The one tick is the minimum delay of the integrated server (the client's move, the server tick, then the entity data). Vanilla can take a tick more depending on when the server ticks; Horizon uses the minimum.

Proof

Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main caeffffb, on the Mac mini:

cargo fmt --all --check                                                   ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings    exit 0
cargo test -p horizon-client -p horizon-world                             all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...)

tools/parity.py --changed origin/main (selects 304 of 326 harnesses: the branches touch game.rs): running on the integration commit; the result follows in a comment.

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1104 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/elytra-hop` --- ### 📝 Commits (1) - [`8b0872f`](https://github.com/horizon-rust/horizon/commit/8b0872f90181325b8e3600d84edc7f81b6b194ea) Elytra: a landing glide lasts one more tick, so hops keep their speed ### 📊 Changes **1 file changed** (+53 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/motion.rs` (+53 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1056. Reported by **Visivel** on Discord: thanks! ## What Elytra hopping works: glide, touch the ground, jump and glide again, and the speed is kept (each sprinting jump adds its boost). ## Why The glide flag is the server's. `LivingEntity.updateFallFlying` clears it on the server when `canGlide` fails (the player is on the ground), from the position the client sent that tick, and the client gets the cleared flag on its next tick, before `aiStep`. So in vanilla a glide that lands goes on for one tick on the ground: `travelFallFlying`'s drag instead of ground friction, and a jump on that tick (with the sprint boost) keeps the speed. Horizon ended the glide on the landing tick, so every hop lost about half of its speed to ground friction. ## How `motion.rs`: `glide_ending` marks the glide the server ended; the flag clears at the start of the next tick, before the glide can start again. New test `a_landing_glide_lasts_a_tick_so_a_jump_keeps_its_speed` (fails without the fix). The one tick is the minimum delay of the integrated server (the client's move, the server tick, then the entity data). Vanilla can take a tick more depending on when the server ticks; Horizon uses the minimum. ## Proof Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main `caeffffb`, on the Mac mini: ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0 cargo test -p horizon-client -p horizon-world all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...) ``` `tools/parity.py --changed origin/main` (selects 304 of 326 harnesses: the branches touch `game.rs`): running on the integration commit; the result follows in a comment. ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:01:05 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3050
No description provided.