[PR #1511] [MERGED] A server's player's client sets its body as in frame: look pitch, use slowdown, boots on powder snow #3558

Closed
opened 2026-11-03 04:10:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/st-player-body


📝 Commits (9)

  • c86996c Fishing on a server's players: a hook per player, ticked on the server and drawn by its clients
  • 287d7a7 Maps on a server's players: each holder's map ticks on the server and its data reaches them
  • fa4ea80 A server's player's client sets its body as in frame: look pitch, use slowdown, boots on powder snow
  • 8c81cc6 Merge remote-tracking branch 'origin/fix/st-wind-charge' into fix/st-fishing
  • 26a91e3 Merge remote-tracking branch 'origin/fix/st-fishing' into fix/st-maps
  • e307f03 Merge remote-tracking branch 'origin/fix/st-maps' into fix/st-player-body
  • 65031a7 Merge remote-tracking branch 'origin/main' into fix/st-fishing
  • 122e3bf Merge remote-tracking branch 'origin/fix/st-fishing' into fix/st-maps
  • 9205071 Merge remote-tracking branch 'origin/fix/st-maps' into fix/st-player-body

📊 Changes

9 files changed (+836 additions, -138 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+53 -37)
📝 crates/horizon-client/src/game/control.rs (+1 -0)
📝 crates/horizon-client/src/game/fishing.rs (+241 -41)
📝 crates/horizon-client/src/game/lan.rs (+2 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+11 -0)
📝 crates/horizon-client/src/game/maps.rs (+321 -50)
📝 crates/horizon-client/src/game/remote.rs (+1 -10)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+7 -0)
📝 tools/lan_e2e.py (+199 -0)

📄 Description

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

Fixes #1278, #1279, #1296 and #1303.

What

On a server (LAN guests, and single player on its server thread), the player's own client now sets up its body the way the in-frame world does:

  • walking while drawing a bow or eating is slowed;
  • sprint-swimming follows the look up and down;
  • leather boots hold the player on powder snow;
  • Auto Jump works when the option is on.

Why

Checked against vanilla 26.3 first. These are all decided by the client, LocalPlayer, for its own body:

  • modifyInput slows the input while an item is in use;
  • Player.travel steers sprint-swimming by the look angle, which uses the pitch;
  • PowderSnowBlock.canEntityWalkOnPowderSnow checks for leather boots;
  • sendPosition turns Auto Jump on from the option.

The in-frame tick filled these fields of PlayerMotion from the window's state every tick: pitch, item_use_speed, leather_boots, freeze_immune and auto_jump_enabled. tick_remote_level, which ticks a server's client, set only the yaw, Respiration, the wings and FAST_LAVA. So on a server:

  • the body's pitch stayed 0, which the issue's diagnostics also saw;
  • nothing slowed the use of an item;
  • the boots were never seen;
  • Auto Jump stayed off.

How

Game::sync_player_body sets everything the window decides for its body, and both ticks call it: the in-frame tick_player and tick_remote_level. The values come from the same sources as before:

  • the look (yaw and pitch);
  • the Auto Jump option;
  • the use slowdown of the item in use (using → the item's use_speed);
  • the helmet's Respiration;
  • the wings;
  • leather boots;
  • freeze-immune wear;
  • FAST_LAVA in the Nether.

Evidence

lan_e2e --check body, for each player:

  • walk 0.8 s, then walk 0.8 s while drawing a bow;
  • stand on a powder snow block with leather boots, then without boots;
  • sprint-swim for 1.5 s, looking 60° down, in water 13 deep.
in-frame host in-frame guest --server-thread host --server-thread guest
before (the maps PR's head) walk 3.45 / bow 0.73, boots hold (0.0), bare sinks, dives −6.86 bow 3.45, boots sink (−1.0), dives −0.14 bow 3.45, boots −1.0, dives −0.12 bow 3.45, boots −1.0, dives −0.16
after walk 3.45 / bow 0.69, boots 0.0, bare −1.0, dives −6.86 same same same

Auto Jump (#1279), with autoJump:true in options.txt, walking 1.5 s at a 1-block step:

  • before, on the server thread: rose 0.0, stopped after 2.2 blocks;
  • after, on the server thread and in the frame alike: rose 1.0, walked 6.11.

How tested

On the top of the stack (feat/st-default a4a101ca9, which contains this branch), on the Mac mini:

  • cargo fmt --all -- --check: clean.
  • cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test -p horizon-client --lib --bins: 1064 + 98 + 18 passed.
  • tools/parity.py --changed origin/main: 106/106 passed on the maps head, then 30/30 for the harnesses whose inputs changed after that.
  • tools/lan_e2e.py in the frame and with --server-thread: wind, fishing, maps, body, strikes and cursor pass in both. boats and minecarts pass with --server-thread.
  • A scripted single player session (walk, mine, place, inventory, combat, eating, boats, minecarts, chests, furnaces, beds, chat, signs, books, totems, keep_inventory, fishing, maps, then save and reopen): 48/48 on the server thread and 48/48 with --in-frame.

Stack

On top of the maps PR (#1510). Merge order: … → #1508 → #1509 → #1510 → this.

Needs Ludovic

A review and a merge, in stack order.

🤖 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/1511 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/st-player-body` --- ### 📝 Commits (9) - [`c86996c`](https://github.com/horizon-rust/horizon/commit/c86996c234457b08dafcae375a36ebdbe8fcadd9) Fishing on a server's players: a hook per player, ticked on the server and drawn by its clients - [`287d7a7`](https://github.com/horizon-rust/horizon/commit/287d7a7eb5e55a7936e89c9ac948f2a66aab74d1) Maps on a server's players: each holder's map ticks on the server and its data reaches them - [`fa4ea80`](https://github.com/horizon-rust/horizon/commit/fa4ea80d3253ea3a65b0663454f4a03c4e52c4b2) A server's player's client sets its body as in frame: look pitch, use slowdown, boots on powder snow - [`8c81cc6`](https://github.com/horizon-rust/horizon/commit/8c81cc63f71f8f4c4c75a30f14406ed8cf3eaf88) Merge remote-tracking branch 'origin/fix/st-wind-charge' into fix/st-fishing - [`26a91e3`](https://github.com/horizon-rust/horizon/commit/26a91e3a08059af6f43af950593665774b58d1fe) Merge remote-tracking branch 'origin/fix/st-fishing' into fix/st-maps - [`e307f03`](https://github.com/horizon-rust/horizon/commit/e307f036842c53942079b1179c3feea9dcd0930e) Merge remote-tracking branch 'origin/fix/st-maps' into fix/st-player-body - [`65031a7`](https://github.com/horizon-rust/horizon/commit/65031a77397c2cc9cee24b2eb5e27d2db0ed36e6) Merge remote-tracking branch 'origin/main' into fix/st-fishing - [`122e3bf`](https://github.com/horizon-rust/horizon/commit/122e3bf2876bd05376ef6e699af07d95aa179165) Merge remote-tracking branch 'origin/fix/st-fishing' into fix/st-maps - [`9205071`](https://github.com/horizon-rust/horizon/commit/92050712fa8c6f2a5a5d52fa83d80e4b31c2f614) Merge remote-tracking branch 'origin/fix/st-maps' into fix/st-player-body ### 📊 Changes **9 files changed** (+836 additions, -138 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+53 -37) 📝 `crates/horizon-client/src/game/control.rs` (+1 -0) 📝 `crates/horizon-client/src/game/fishing.rs` (+241 -41) 📝 `crates/horizon-client/src/game/lan.rs` (+2 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+11 -0) 📝 `crates/horizon-client/src/game/maps.rs` (+321 -50) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -10) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+7 -0) 📝 `tools/lan_e2e.py` (+199 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1278, #1279, #1296 and #1303. ## What On a server (LAN guests, and single player on its server thread), the player's own client now sets up its body the way the in-frame world does: - walking while drawing a bow or eating is slowed; - sprint-swimming follows the look up and down; - leather boots hold the player on powder snow; - Auto Jump works when the option is on. ## Why Checked against vanilla 26.3 first. These are all decided by the client, `LocalPlayer`, for its own body: - `modifyInput` slows the input while an item is in use; - `Player.travel` steers sprint-swimming by the look angle, which uses the pitch; - `PowderSnowBlock.canEntityWalkOnPowderSnow` checks for leather boots; - `sendPosition` turns Auto Jump on from the option. The in-frame tick filled these fields of `PlayerMotion` from the window's state every tick: `pitch`, `item_use_speed`, `leather_boots`, `freeze_immune` and `auto_jump_enabled`. `tick_remote_level`, which ticks a server's client, set only the yaw, Respiration, the wings and FAST_LAVA. So on a server: - the body's pitch stayed 0, which the issue's diagnostics also saw; - nothing slowed the use of an item; - the boots were never seen; - Auto Jump stayed off. ## How `Game::sync_player_body` sets everything the window decides for its body, and both ticks call it: the in-frame `tick_player` and `tick_remote_level`. The values come from the same sources as before: - the look (yaw and pitch); - the Auto Jump option; - the use slowdown of the item in use (`using` → the item's `use_speed`); - the helmet's Respiration; - the wings; - leather boots; - freeze-immune wear; - FAST_LAVA in the Nether. ## Evidence `lan_e2e --check body`, for each player: - walk 0.8 s, then walk 0.8 s while drawing a bow; - stand on a powder snow block with leather boots, then without boots; - sprint-swim for 1.5 s, looking 60° down, in water 13 deep. | | in-frame host | in-frame guest | `--server-thread` host | `--server-thread` guest | |---|---|---|---|---| | **before** (the maps PR's head) | walk 3.45 / bow 0.73, boots hold (0.0), bare sinks, dives −6.86 | **bow 3.45, boots sink (−1.0), dives −0.14** | **bow 3.45, boots −1.0, dives −0.12** | **bow 3.45, boots −1.0, dives −0.16** | | **after** | walk 3.45 / bow 0.69, boots 0.0, bare −1.0, dives −6.86 | same | same | same | Auto Jump (#1279), with `autoJump:true` in `options.txt`, walking 1.5 s at a 1-block step: - before, on the server thread: rose 0.0, stopped after 2.2 blocks; - after, on the server thread and in the frame alike: rose 1.0, walked 6.11. ## How tested On the top of the stack (`feat/st-default` a4a101ca9, which contains this branch), on the Mac mini: - `cargo fmt --all -- --check`: clean. - `cargo clippy --workspace --all-targets -- -D warnings`: clean. - `cargo test -p horizon-client --lib --bins`: 1064 + 98 + 18 passed. - `tools/parity.py --changed origin/main`: 106/106 passed on the maps head, then 30/30 for the harnesses whose inputs changed after that. - `tools/lan_e2e.py` in the frame and with `--server-thread`: `wind`, `fishing`, `maps`, `body`, `strikes` and `cursor` pass in both. `boats` and `minecarts` pass with `--server-thread`. - A scripted single player session (walk, mine, place, inventory, combat, eating, boats, minecarts, chests, furnaces, beds, chat, signs, books, totems, keep_inventory, fishing, maps, then save and reopen): 48/48 on the server thread and 48/48 with `--in-frame`. ## Stack On top of the maps PR (#1510). Merge order: … → #1508 → #1509 → #1510 → **this**. ## Needs Ludovic A review and a merge, in stack order. 🤖 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-03 04:10:24 +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#3558
No description provided.