[PR #787] [MERGED] LAN guests: container clicks, head turns, XP orbs, sleeping, mob pushes and eating (#722–#727 combined) #2810

Closed
opened 2026-11-02 15:59:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: bm2/combined


📝 Commits (10+)

  • 28d218b Guests: a bed puts the guest to sleep, not the host
  • ce62f9c Server clients: eating plays on the player's own screen
  • 123e828 Guests: container clicks reach the server (chests, furnaces, crafting drags)
  • 69dd4fe Server clients: mobs' and players' heads turn smoothly, not flicker
  • 22dc3e5 Guests: touching mobs push them on their own client, as in vanilla
  • d1d36f4 Guests: experience orbs fly to them and give them their points
  • a72e2a2 Merge commit '69dd4feb31' into bm2/combined
  • 6f5a331 Merge commit '123e8286ac' into bm2/combined
  • 9bb22ca Merge remote-tracking branch 'pr/725' into bm2/combined
  • e74d520 Merge remote-tracking branch 'pr/726' into bm2/combined

📊 Changes

22 files changed (+1071 additions, -114 deletions)

View changed files

📝 crates/horizon-client/examples/mob_ai_probe.rs (+1 -0)
📝 crates/horizon-client/src/entities.rs (+2 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+2 -0)
📝 crates/horizon-client/src/game.rs (+110 -51)
📝 crates/horizon-client/src/game/agent.rs (+4 -0)
📝 crates/horizon-client/src/game/commands.rs (+2 -0)
📝 crates/horizon-client/src/game/creatures.rs (+1 -0)
📝 crates/horizon-client/src/game/lan.rs (+19 -1)
📝 crates/horizon-client/src/game/lan_actions.rs (+182 -2)
📝 crates/horizon-client/src/game/lan_mobs.rs (+2 -0)
📝 crates/horizon-client/src/game/persist.rs (+7 -1)
📝 crates/horizon-client/src/game/pickups.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+437 -40)
📝 crates/horizon-client/src/game/respawn_anchor.rs (+1 -1)
📝 crates/horizon-client/src/game/tweaks.rs (+1 -9)
📝 crates/horizon-client/src/lan/guest.rs (+12 -0)
📝 crates/horizon-client/src/lan/hub.rs (+36 -1)
📝 crates/horizon-client/src/lan/playerdata.rs (+2 -0)
📝 crates/horizon-client/src/menu.rs (+13 -0)
📝 crates/horizon-client/src/mobs.rs (+3 -0)

...and 2 more files

📄 Description

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

What

The six guest fixes for #696, combined on current main because they conflicted with each other and with main:

  • #722 container clicks: a guest's clicks in chests, furnaces and crafting grids are predicted and sent as vanilla does.
  • #723 other players' head and body turns (LivingEntity.tickHeadTurn).
  • #724 experience orbs fly to the guest and give the guest their points (Player.takeXpDelay).
  • #725 a guest sleeps in a bed, and the night skips.
  • #726 mobs push the guest (LivingEntity.pushEntities on the client).
  • #727 a guest's eating plays on their screen, and the server eats the food.

Each PR's own commits are merged unchanged, so this PR marks them merged. Conflict resolutions:

  • game/remote.rs: both sides' new helpers are kept. A sleeper lies still, and a guest who isn't sleeping takes mob pushes.
  • game/agent.rs: the state reports both sleeping and using.
  • game/lan_actions.rs: both portal and xp_delay fields are kept.
  • tools/lan_e2e.py: the check lists, docs and dispatch table are unions. Every function is byte-identical to its version in main or in its PR (checked with ast).

How tested

On the Mac mini, after merging current main (including #773's eating changes):

cargo fmt --all --check                                      OK
cargo clippy --workspace --all-targets -- -D warnings        OK
cargo test -p horizon-client                                 843 + 66 + … passed, 0 failed
python -m unittest discover -s tests                         236 tests; only the 2 known macOS-only errors
python -m unittest tests.test_world_input_capture            OK
tools/parity.py mob_ai                                       PASS (134/134 scenarios)
tools/parity.py lan dedicated_server                         PASS, PASS (the first dedicated_server run missed 2 chunks; this harness flakes, and the rerun passed)
tools/lan_e2e.py --check clicks sleep push eat xp            all PASS

The lan_e2e results:

  • clicks: chest, furnace, crafting grid and drag all land.
  • sleep: the guest sleeps at the bed, and the night skips to time 44.
  • push: a mob pushed the guest 0.6 blocks.
  • eat: the item in use counts up to 23 ticks, food goes 6 → 11 and one bread is eaten.
  • xp: 3 orbs are seen, the guest reaches level 2 and the host keeps 0.

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/787 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `bm2/combined` --- ### 📝 Commits (10+) - [`28d218b`](https://github.com/horizon-rust/horizon/commit/28d218b3a2c17ff1b5b373b52b24b8d3000bfd2e) Guests: a bed puts the guest to sleep, not the host - [`ce62f9c`](https://github.com/horizon-rust/horizon/commit/ce62f9c57f70ea4a50fd6a0d45604f017d9cde38) Server clients: eating plays on the player's own screen - [`123e828`](https://github.com/horizon-rust/horizon/commit/123e8286ac55894a0e9f61c78b3844fd46241e2a) Guests: container clicks reach the server (chests, furnaces, crafting drags) - [`69dd4fe`](https://github.com/horizon-rust/horizon/commit/69dd4feb316616eef6255a4f41dc3b680a6a43e6) Server clients: mobs' and players' heads turn smoothly, not flicker - [`22dc3e5`](https://github.com/horizon-rust/horizon/commit/22dc3e595404dfc0c0143da4ab72edbb82ebe31b) Guests: touching mobs push them on their own client, as in vanilla - [`d1d36f4`](https://github.com/horizon-rust/horizon/commit/d1d36f4121bd8eb1a4d3d95b7072420cf3ef6d65) Guests: experience orbs fly to them and give them their points - [`a72e2a2`](https://github.com/horizon-rust/horizon/commit/a72e2a2f0ed14ef7a18f4aa249544d76510a990b) Merge commit '69dd4feb316616eef6255a4f41dc3b680a6a43e6' into bm2/combined - [`6f5a331`](https://github.com/horizon-rust/horizon/commit/6f5a3319eedc17b6fe0b85ebeef143a5d81ca97a) Merge commit '123e8286ac55894a0e9f61c78b3844fd46241e2a' into bm2/combined - [`9bb22ca`](https://github.com/horizon-rust/horizon/commit/9bb22caa22b42936440b9b2f8643c5d36c45ab75) Merge remote-tracking branch 'pr/725' into bm2/combined - [`e74d520`](https://github.com/horizon-rust/horizon/commit/e74d5207dcee116113d76e07ade4180f06f315f4) Merge remote-tracking branch 'pr/726' into bm2/combined ### 📊 Changes **22 files changed** (+1071 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/mob_ai_probe.rs` (+1 -0) 📝 `crates/horizon-client/src/entities.rs` (+2 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+2 -0) 📝 `crates/horizon-client/src/game.rs` (+110 -51) 📝 `crates/horizon-client/src/game/agent.rs` (+4 -0) 📝 `crates/horizon-client/src/game/commands.rs` (+2 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+19 -1) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+182 -2) 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+2 -0) 📝 `crates/horizon-client/src/game/persist.rs` (+7 -1) 📝 `crates/horizon-client/src/game/pickups.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+437 -40) 📝 `crates/horizon-client/src/game/respawn_anchor.rs` (+1 -1) 📝 `crates/horizon-client/src/game/tweaks.rs` (+1 -9) 📝 `crates/horizon-client/src/lan/guest.rs` (+12 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+36 -1) 📝 `crates/horizon-client/src/lan/playerdata.rs` (+2 -0) 📝 `crates/horizon-client/src/menu.rs` (+13 -0) 📝 `crates/horizon-client/src/mobs.rs` (+3 -0) _...and 2 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The six guest fixes for #696, combined on current main because they conflicted with each other and with main: - #722 container clicks: a guest's clicks in chests, furnaces and crafting grids are predicted and sent as vanilla does. - #723 other players' head and body turns (`LivingEntity.tickHeadTurn`). - #724 experience orbs fly to the guest and give the guest their points (`Player.takeXpDelay`). - #725 a guest sleeps in a bed, and the night skips. - #726 mobs push the guest (`LivingEntity.pushEntities` on the client). - #727 a guest's eating plays on their screen, and the server eats the food. Each PR's own commits are merged unchanged, so this PR marks them merged. Conflict resolutions: - `game/remote.rs`: both sides' new helpers are kept. A sleeper lies still, and a guest who isn't sleeping takes mob pushes. - `game/agent.rs`: the state reports both `sleeping` and `using`. - `game/lan_actions.rs`: both `portal` and `xp_delay` fields are kept. - `tools/lan_e2e.py`: the check lists, docs and dispatch table are unions. Every function is byte-identical to its version in main or in its PR (checked with `ast`). ## How tested On the Mac mini, after merging current main (including #773's eating changes): ``` cargo fmt --all --check OK cargo clippy --workspace --all-targets -- -D warnings OK cargo test -p horizon-client 843 + 66 + … passed, 0 failed python -m unittest discover -s tests 236 tests; only the 2 known macOS-only errors python -m unittest tests.test_world_input_capture OK tools/parity.py mob_ai PASS (134/134 scenarios) tools/parity.py lan dedicated_server PASS, PASS (the first dedicated_server run missed 2 chunks; this harness flakes, and the rerun passed) tools/lan_e2e.py --check clicks sleep push eat xp all PASS ``` The lan_e2e results: - clicks: chest, furnace, crafting grid and drag all land. - sleep: the guest sleeps at the bed, and the night skips to time 44. - push: a mob pushed the guest 0.6 blocks. - eat: the item in use counts up to 23 ticks, food goes 6 → 11 and one bread is eaten. - xp: 3 orbs are seen, the guest reaches level 2 and the host keeps 0. ## 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 15:59:14 +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#2810
No description provided.