[PR #2315] [MERGED] Reject boarding horses with an existing mob passenger #4195

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2315
Author: @rdbtCVS
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: t3/reject-occupied-horse-mount


📝 Commits (3)

  • 004ad99 Reject boarding a horse with an existing mob passenger
  • f661443 Read LAN passenger fixture output through the host
  • 6cb5e49 An occupied horse gives no inventory or feeding either

📊 Changes

2 files changed (+58 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/mounts.rs (+13 -0)
📝 tools/lan_e2e.py (+45 -2)

📄 Description

🤖 Opened by rdbt's AI agent (Codex, GPT-6.1 Sol), not by rdbt himself.

What and why

Fixes #1759. Right-clicking a zombie horse with a zombie passenger could attach a player to its already occupied seat. The shared player/guest horse boarding path now checks existing live mob passengers before mounting. Feeding, equipment and inventory handling stay in their existing paths; camels and separately handled vehicle families retain their capacity behavior.

The existing LAN integration harness gains occupied_horse: host and guest each right-click an occupied zombie horse and then a free tamed zombie horse. It verifies the passenger fixture, rejected boarding, and successful free boarding through real clients.

Vanilla reference

Inspected the pinned 26.3 server-game bytecode with javap -c -p: net.minecraft.world.entity.animal.equine.ZombieHorse.mobInteract, AbstractHorse.mobInteract / doPlayerRide, and Entity.startRiding / canAddPassenger. Ordinary horse boarding uses the inherited empty-passenger-list check; Camel.canAddPassenger overrides capacity.

Self-check

  • Fast client/control build: exit 0.
  • tools/lan_e2e.py --bin-dir target/fast --server-thread --check occupied_horse: exit 0; host and guest passed.
  • tools/lan_e2e.py --bin-dir target/fast --in-frame --check occupied_horse: exit 0; host and guest passed.
  • git diff --check, commit hook and push hook: exit 0.
  • Full parity left to CI as requested.

The initial self-check was intercepted by the machine's stale preparation wrapper (exit 1 before checks); the direct run bypasses it. The first focused LAN run exited 1 because guest control commands acknowledge without returning command output; the fixture now reads its passenger NBT through the host, and both final runs above passed.

python3 tools/pr_ready.py --quick --base origin/main: exit 0 (direct environment, preparation wrapper bypassed).

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 800b91567, 4 min 59 s)

Check Result
Scope ✅ 2 files, +56 −2
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 312 passed (1 min 30 s)
rustfmt ✅ (9 s)
clippy ✅ (3 s)
tests: horizon-client ✅ 1335 passed (2 min 35 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 36 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, creative_mining, cursor_death, cushion_placement, dedicated_server, dispenser, friends_integration, hardcore_respawn, lan_integration and 24 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Codex (GPT-6.1 Sol).


🔄 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/2315 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/reject-occupied-horse-mount` --- ### 📝 Commits (3) - [`004ad99`](https://github.com/horizon-rust/horizon/commit/004ad993d9e77d8262094afea01b2351b1bf3403) Reject boarding a horse with an existing mob passenger - [`f661443`](https://github.com/horizon-rust/horizon/commit/f661443fa993eb4d26649cb6b7c9c67d76cd683e) Read LAN passenger fixture output through the host - [`6cb5e49`](https://github.com/horizon-rust/horizon/commit/6cb5e4954e3718ba55d1347c47157f7faa0f4127) An occupied horse gives no inventory or feeding either ### 📊 Changes **2 files changed** (+58 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/mounts.rs` (+13 -0) 📝 `tools/lan_e2e.py` (+45 -2) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (Codex, GPT-6.1 Sol), not by rdbt himself. ## What and why Fixes #1759. Right-clicking a zombie horse with a zombie passenger could attach a player to its already occupied seat. The shared player/guest horse boarding path now checks existing live mob passengers before mounting. Feeding, equipment and inventory handling stay in their existing paths; camels and separately handled vehicle families retain their capacity behavior. The existing LAN integration harness gains `occupied_horse`: host and guest each right-click an occupied zombie horse and then a free tamed zombie horse. It verifies the passenger fixture, rejected boarding, and successful free boarding through real clients. ## Vanilla reference Inspected the pinned 26.3 server-game bytecode with `javap -c -p`: `net.minecraft.world.entity.animal.equine.ZombieHorse.mobInteract`, `AbstractHorse.mobInteract` / `doPlayerRide`, and `Entity.startRiding` / `canAddPassenger`. Ordinary horse boarding uses the inherited empty-passenger-list check; `Camel.canAddPassenger` overrides capacity. ## Self-check - Fast client/control build: exit 0. - `tools/lan_e2e.py --bin-dir target/fast --server-thread --check occupied_horse`: exit 0; host and guest passed. - `tools/lan_e2e.py --bin-dir target/fast --in-frame --check occupied_horse`: exit 0; host and guest passed. - `git diff --check`, commit hook and push hook: exit 0. - Full parity left to CI as requested. The initial self-check was intercepted by the machine's stale preparation wrapper (exit 1 before checks); the direct run bypasses it. The first focused LAN run exited 1 because guest control commands acknowledge without returning command output; the fixture now reads its passenger NBT through the host, and both final runs above passed. `python3 tools/pr_ready.py --quick --base origin/main`: exit 0 (direct environment, preparation wrapper bypassed). **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 800b91567, 4 min 59 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +56 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 312 passed (1 min 30 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (3 s) | | tests: horizon-client | ✅ 1335 passed (2 min 35 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 36 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, creative_mining, cursor_death, cushion_placement, dedicated_server, dispenser, friends_integration, hardcore_respawn, lan_integration and 24 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Codex](https://openai.com/codex/) (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:23 +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#4195
No description provided.