[PR #1781] [MERGED] Fix entities staying seated after their boat is destroyed #3755

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

📋 Pull Request Information

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

Base: main ← Head: fix/vehicle-passenger-pose


📝 Commits (4)

  • 1ec6d6d Detach entity passengers when their vehicle is removed
  • 806f7d8 Merge origin/main into fix/vehicle-passenger-pose
  • 2f1f015 mobs diagnostics: say why passenger is set outside the json! macro
  • bb414b2 Merge main into fix/vehicle-passenger-pose: keep both lan_e2e checks

📊 Changes

3 files changed (+60 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+6 -2)
📝 crates/horizon-client/src/game/remote.rs (+4 -4)
📝 tools/lan_e2e.py (+50 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (OpenAI Codex, GPT-6), not by levzzz5154.

What and why

After a boat was destroyed, clients removed the boat but left nearby mobs and other players marked as its passengers. Their models could stay seated indefinitely. Entity removal now clears every passenger's mount and pose flags through the existing passenger-update handler, including when the server sends no empty SetPassengers packet first.

Expose the passenger pose flag in mobs diagnostics and add lan_e2e.py --check boat-dismount-pose: two husks board a boat, a creative player destroys it, and the host and guest both verify that the boat is gone, each mount is null, and each passenger pose flag is false.

Vanilla reference

Minecraft 26.3 ClientLevel.removeEntity calls Entity.setRemoved, which calls stopRiding on every passenger. ClientPacketListener.handleSetEntityPassengersPacket handles explicit passenger updates separately; removal must detach passengers without relying on that packet.

Validation

  • Reproduced before the fix: both passengers still referenced the removed boat.
  • Gameplay regression passes with an in-frame host and a server-thread host, including the LAN observer in each run. Screenshots confirm the husks return to standing. These isolated offscreen gameplay runs were before rebasing onto the latest upstream main.
  • Optimized game build and Clippy passed before the rebase; the self-check below covers the rebased commit.

Self-check

The latest upstream main already has an unused save_root binding in crates/horizon-client/src/game.rs:7533, so Clippy with -D warnings fails there. This PR does not modify that binding. Vanilla parity harnesses are deferred to CI by --quick.

pr_ready (tools/pr_ready.py --quick --base upstream/main on cachyos-x8664, against upstream/main at 7d0ae5658, 2 min 24 s)

Check Result
Scope ✅ 3 files, +58 −6
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 267 passed (17 s)
rustfmt ✅ (4 s)
clippy ❌ failed (9 s)
tests: horizon-client ✅ 1218 passed (1 min 51 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 250 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, datafix, decorated_region, decoration, decoration_region, dedicated_server, delta, density and 238 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with OpenAI Codex.


🔄 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/1781 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/vehicle-passenger-pose` --- ### 📝 Commits (4) - [`1ec6d6d`](https://github.com/horizon-rust/horizon/commit/1ec6d6d734ff97716ed5f6e1796a13db366006bd) Detach entity passengers when their vehicle is removed - [`806f7d8`](https://github.com/horizon-rust/horizon/commit/806f7d87f3a85ed55ef2193d9801c15959b00aaf) Merge origin/main into fix/vehicle-passenger-pose - [`2f1f015`](https://github.com/horizon-rust/horizon/commit/2f1f0150eb112062fb696676bc578ba174fa3472) mobs diagnostics: say why passenger is set outside the json! macro - [`bb414b2`](https://github.com/horizon-rust/horizon/commit/bb414b263c0abd3dddeaad8d0762b9872b0cdf00) Merge main into fix/vehicle-passenger-pose: keep both lan_e2e checks ### 📊 Changes **3 files changed** (+60 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+6 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+4 -4) 📝 `tools/lan_e2e.py` (+50 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (OpenAI Codex, GPT-6), not by levzzz5154. ## What and why After a boat was destroyed, clients removed the boat but left nearby mobs and other players marked as its passengers. Their models could stay seated indefinitely. Entity removal now clears every passenger's mount and pose flags through the existing passenger-update handler, including when the server sends no empty `SetPassengers` packet first. Expose the passenger pose flag in `mobs` diagnostics and add `lan_e2e.py --check boat-dismount-pose`: two husks board a boat, a creative player destroys it, and the host and guest both verify that the boat is gone, each mount is null, and each passenger pose flag is false. ## Vanilla reference Minecraft 26.3 `ClientLevel.removeEntity` calls `Entity.setRemoved`, which calls `stopRiding` on every passenger. `ClientPacketListener.handleSetEntityPassengersPacket` handles explicit passenger updates separately; removal must detach passengers without relying on that packet. ## Validation - Reproduced before the fix: both passengers still referenced the removed boat. - Gameplay regression passes with an in-frame host and a server-thread host, including the LAN observer in each run. Screenshots confirm the husks return to standing. These isolated offscreen gameplay runs were before rebasing onto the latest upstream main. - Optimized game build and Clippy passed before the rebase; the self-check below covers the rebased commit. ## Self-check The latest upstream main already has an unused `save_root` binding in `crates/horizon-client/src/game.rs:7533`, so Clippy with `-D warnings` fails there. This PR does not modify that binding. Vanilla parity harnesses are deferred to CI by `--quick`. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on cachyos-x8664, against upstream/main at 7d0ae5658, 2 min 24 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +58 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 267 passed (17 s) | | rustfmt | ✅ (4 s) | | clippy | ❌ failed (9 s) | | tests: horizon-client | ✅ 1218 passed (1 min 51 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 250 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, datafix, decorated_region, decoration, decoration_region, dedicated_server, delta, density and 238 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [OpenAI Codex](https://chatgpt.com/codex). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:06 +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#3755
No description provided.