[PR #6311] [MERGED] Riders get off a mount that can't swim with one when their eyes are in water #6787

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6311
Author: @Akirabane
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/6152-submerged-mount


📝 Commits (2)

  • 8ecf339 Riders: a rider whose eyes are in water gets off a mount that can't swim with one
  • fd43c46 Merge remote-tracking branch 'origin/main' into fix/6152-submerged-mount

📊 Changes

3 files changed (+176 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+4 -1)
📝 crates/horizon-client/src/game/mounts.rs (+83 -0)
➕ tools/test_mount_submerged_parity.py (+89 -0)

📄 Description

🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review.

What and why

Fixes #6152

#6152 was claimed and assigned to me before #6294 was opened. #6294 applies the same rule to the window's player only; this one also covers a server's player and the mobs that ride a mob, pins the tag's mounts in a test and adds a vanilla harness. I'm happy to fold anything #6294 does better into this one, or the other way round.

LivingEntity.baseTick stops a rider whose eyes are in water (and not in a bubble column) from riding a vehicle of the dismounts_underwater tag: camel, chicken, donkey, happy ghast, horse, llama, mule, pig, ravager, spider, strider, trader llama and zombie horse. Horizon only did it for boats (#6029).

  • The rider is the window's player, a server's player (it goes through the same tick as the mount's input, so a LAN guest's client is told as it is for a buck), or a mob that rides a mob (a baby zombie on a chicken).
  • Eyes in water is Entity.updateFluidOnEyes as the boats read it: the fluid height at the eye block above the eye, and not a bubble column.
  • A mount outside the tag (a skeleton horse) keeps its rider underwater.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

LivingEntity.baseTick (the isPassenger() / getVehicle().dismountsUnderwater() / stopRiding() branch), Entity.dismountsUnderwater, data/minecraft/tags/entity_type/dismounts_underwater.json. Harness: tools/test_mount_submerged_parity.py.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on DESKTOP-6PU1HU6, against origin/main at dea6dea98, 4 min 53 s)

Check Result
Scope ✅ 3 files, +176 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 586 run, 2 errors, neither from this change: test_port_ledger fails to import here (a package named tests on my Windows machine shadows the repo's; python -m unittest tests.test_port_ledger passes), and test_world_input_capture (its capture program exits 101 on my machine; it comes from levzzz's tests)
rustfmt ✅ (8 s)
clippy ✅ (53 s)
tests: horizon-client ❌ 1195 passed, 1 failed: entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation ("an airborne stand must fall"). It fails the same on origin/main without this change (I put mounts.rs and creatures.rs back to main's and ran it again); it came with #6089
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Proof

Against a vanilla 26.3 server (tools/test_mount_submerged_parity.py, new): 14 mounts, three steps each (dry, water up to the mount's back, water over the rider's head), 42 passenger observations, all identical to vanilla. The skeleton horse and the cow are in it as mounts that keep their rider.

In the game, headless, before and after:

Case Before After
The window's player on a saddled pig, the area flooded stays mounted while the pig floats up thrown off
A LAN guest on a saddled pig, the area flooded stays mounted thrown off, the host is not
A baby zombie on a chicken, the area flooded glued to it (0.52 block apart over 6 samples) lets go (0.75 growing to 5.6 blocks)

By hand, as a player: the pig and the horse throw the rider into the water, the skeleton horse keeps it.

One unit test pins the tag's 13 mounts and three that are not in it.


🔄 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/6311 **Author:** [@Akirabane](https://github.com/Akirabane) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6152-submerged-mount` --- ### 📝 Commits (2) - [`8ecf339`](https://github.com/horizon-rust/horizon/commit/8ecf339e5b4748e738704c2f5e88b4c5c8aa9e62) Riders: a rider whose eyes are in water gets off a mount that can't swim with one - [`fd43c46`](https://github.com/horizon-rust/horizon/commit/fd43c4620717188793cc80b91f5ba8071d0e4f4f) Merge remote-tracking branch 'origin/main' into fix/6152-submerged-mount ### 📊 Changes **3 files changed** (+176 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+4 -1) 📝 `crates/horizon-client/src/game/mounts.rs` (+83 -0) ➕ `tools/test_mount_submerged_parity.py` (+89 -0) </details> ### 📄 Description 🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review. ## What and why Fixes #6152 #6152 was claimed and assigned to me before #6294 was opened. #6294 applies the same rule to the window's player only; this one also covers a server's player and the mobs that ride a mob, pins the tag's mounts in a test and adds a vanilla harness. I'm happy to fold anything #6294 does better into this one, or the other way round. `LivingEntity.baseTick` stops a rider whose eyes are in water (and not in a bubble column) from riding a vehicle of the `dismounts_underwater` tag: camel, chicken, donkey, happy ghast, horse, llama, mule, pig, ravager, spider, strider, trader llama and zombie horse. Horizon only did it for boats (#6029). - **The rider** is the window's player, a server's player (it goes through the same tick as the mount's input, so a LAN guest's client is told as it is for a buck), or a mob that rides a mob (a baby zombie on a chicken). - **Eyes in water** is `Entity.updateFluidOnEyes` as the boats read it: the fluid height at the eye block above the eye, and not a bubble column. - A mount outside the tag (a skeleton horse) keeps its rider underwater. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `LivingEntity.baseTick` (the `isPassenger()` / `getVehicle().dismountsUnderwater()` / `stopRiding()` branch), `Entity.dismountsUnderwater`, `data/minecraft/tags/entity_type/dismounts_underwater.json`. Harness: `tools/test_mount_submerged_parity.py`. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DESKTOP-6PU1HU6, against origin/main at dea6dea98, 4 min 53 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +176 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 586 run, 2 errors, neither from this change: `test_port_ledger` fails to import here (a package named `tests` on my Windows machine shadows the repo's; `python -m unittest tests.test_port_ledger` passes), and `test_world_input_capture` (its capture program exits 101 on my machine; it comes from levzzz's tests) | | rustfmt | ✅ (8 s) | | clippy | ✅ (53 s) | | tests: horizon-client | ❌ 1195 passed, 1 failed: `entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation` ("an airborne stand must fall"). It fails the same on origin/main without this change (I put mounts.rs and creatures.rs back to main's and ran it again); it came with #6089 | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Proof **Against a vanilla 26.3 server** (`tools/test_mount_submerged_parity.py`, new): 14 mounts, three steps each (dry, water up to the mount's back, water over the rider's head), 42 passenger observations, all identical to vanilla. The skeleton horse and the cow are in it as mounts that keep their rider. **In the game, headless, before and after:** | Case | Before | After | | --- | --- | --- | | The window's player on a saddled pig, the area flooded | stays mounted while the pig floats up | thrown off | | A LAN guest on a saddled pig, the area flooded | stays mounted | thrown off, the host is not | | A baby zombie on a chicken, the area flooded | glued to it (0.52 block apart over 6 samples) | lets go (0.75 growing to 5.6 blocks) | **By hand, as a player:** the pig and the horse throw the rider into the water, the skeleton horse keeps it. One unit test pins the tag's 13 mounts and three that are not in it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:26:40 +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#6787
No description provided.