[PR #7872] Mobs in a rising bubble column get the full lift in water #7873

Open
opened 2026-11-03 07:25:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7872
Author: @HrafnaValkyrja
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/cart-bubble-column


📝 Commits (2)

  • 90d7553 A bubble column lifts a mob after its travel, as LivingEntity.aiStep does
  • 68152ad Merge remote-tracking branch 'origin/main' into fix/cart-bubble-column

📊 Changes

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

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+2 -0)
📝 crates/horizon-client/src/mobs/living.rs (+72 -2)

📄 Description

🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself.

A mob in a rising bubble column is now lifted as in vanilla while it is in water.

What was wrong

Entity.move has no bubble column push in vanilla. LivingEntity.aiStep calls travel and only then applyEffectsFromBlocks, so the lift (0.06 for each column block the box touches, capped at 0.7) is added after the water drag of that tick. Horizon pushed at the end of the mob's move, which runs inside travel, so the 0.8 water drag scaled the lift: an iron golem in an up column had 0.139 vertical velocity on the first tick where vanilla has 0.175.

The push now has its own method, Mob::apply_effects_from_blocks, called right after travel in the mob tick.

Fixes #7871

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.aiStep: travel(input), then applyEffectsFromBlocks().
  • LivingEntity.travelInWater: move(...), then the velocity is multiplied by the water slowdown (0.8 vertically).
  • Entity.move: no call to applyEffectsFromBlocks.
  • Entity.handleOnInsideBubbleColumn / handleOnAboveBubbleColumn: unchanged; the port already matched them.
  • For a minecart (AbstractMinecart.applyEffectsFromBlocks) and a boat nothing differs from vanilla, so they are left as they are.

Proof

Side by side on the real 26.3 server and Horizon, ticks frozen, every entity inside force-loaded chunks (checked by the tool), glass ponds so no water flows out, 40 ticks:

  • Iron golem in an up column, unleashed and on a lead to a fence post: before the fix 170 of 328 values match; after, 296 of 328. Tick 1 vertical velocity: Horizon 0.139 before, 0.175 after, vanilla 0.175.
  • Unleashed golem and both boats: all values match after the fix.
  • Minecart and boat dropped into an up column and a down column, 60 ticks: 732 of 732 values match, before and after (nothing to fix there).
  • The 32 values still different are the golem on the lead, by at most 1.0e-4 blocks (the lead pull itself; not touched here).
  • Unit test a_bubble_column_lifts_a_mob_after_travel_not_inside_it: fails without the fix (travel alone returned 0.139, expected -0.005), passes with it.
  • mobs:: unit tests: 375 passed.

Harnesses

Run in the build fence with DISPLAY=:0 HORIZON_E2E_HEADLESS=1, tools/parity.py on the harnesses that cover the moved code (the full --changed set of 253 is left to CI):

  • Pass: entity_fluid, living_fluid, living_fall, living_motion, living_air.
  • mob_ai: 267 of 272 scenarios match, 126862 of 127179 mob-ticks. The five that diverge (four horse_age_*_noai_True_locked_* scenarios on random-draw count, and sniffer_baby on age) are the same five, with the same counts, on origin/main at the base of this branch (run fresh, in a separate worktree), so this change does not cause them.
  • tools/pr_ready.py --quick: rustfmt, clippy, 614 Python tests and 1476 horizon-client-lib tests pass.

Left alone: carts and boats; the lead pull difference of 1e-4; items and armor stands in columns (#7669, #7701); minecart arrival at a portal (#7598).

Proved by script against the real 26.3 server; no human played this change.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on Valhalla, against origin/main at 31f83499b, 10 min 27 s)

Check Result
Scope ✅ 2 files, +74 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (30 s)
rustfmt ✅ (7 s)
Rust ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 44 s)
tests: horizon-client-lib ✅ 1491 passed (7 min 42 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 253 affected, to run in CI (--quick): anvil_turtle_egg, armor_stand_turtle_egg, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer and 241 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code

https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m


🔄 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/7872 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/cart-bubble-column` --- ### 📝 Commits (2) - [`90d7553`](https://github.com/horizon-rust/horizon/commit/90d755321144243d0060bf3a62f05ba5cdb8291d) A bubble column lifts a mob after its travel, as LivingEntity.aiStep does - [`68152ad`](https://github.com/horizon-rust/horizon/commit/68152ad42b2723c0c620c028f9c463385be91481) Merge remote-tracking branch 'origin/main' into fix/cart-bubble-column ### 📊 Changes **2 files changed** (+74 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs/living.rs` (+72 -2) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. A mob in a rising bubble column is now lifted as in vanilla while it is in water. ## What was wrong `Entity.move` has no bubble column push in vanilla. `LivingEntity.aiStep` calls `travel` and only then `applyEffectsFromBlocks`, so the lift (0.06 for each column block the box touches, capped at 0.7) is added after the water drag of that tick. Horizon pushed at the end of the mob's move, which runs inside `travel`, so the 0.8 water drag scaled the lift: an iron golem in an up column had 0.139 vertical velocity on the first tick where vanilla has 0.175. The push now has its own method, `Mob::apply_effects_from_blocks`, called right after `travel` in the mob tick. Fixes #7871 ## 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.aiStep`: `travel(input)`, then `applyEffectsFromBlocks()`. - `LivingEntity.travelInWater`: `move(...)`, then the velocity is multiplied by the water slowdown (0.8 vertically). - `Entity.move`: no call to `applyEffectsFromBlocks`. - `Entity.handleOnInsideBubbleColumn` / `handleOnAboveBubbleColumn`: unchanged; the port already matched them. - For a minecart (`AbstractMinecart.applyEffectsFromBlocks`) and a boat nothing differs from vanilla, so they are left as they are. ## Proof Side by side on the real 26.3 server and Horizon, ticks frozen, every entity inside force-loaded chunks (checked by the tool), glass ponds so no water flows out, 40 ticks: - Iron golem in an up column, unleashed and on a lead to a fence post: before the fix 170 of 328 values match; after, 296 of 328. Tick 1 vertical velocity: Horizon 0.139 before, 0.175 after, vanilla 0.175. - Unleashed golem and both boats: all values match after the fix. - Minecart and boat dropped into an up column and a down column, 60 ticks: 732 of 732 values match, before and after (nothing to fix there). - The 32 values still different are the golem on the lead, by at most 1.0e-4 blocks (the lead pull itself; not touched here). - Unit test `a_bubble_column_lifts_a_mob_after_travel_not_inside_it`: fails without the fix (travel alone returned 0.139, expected -0.005), passes with it. - `mobs::` unit tests: 375 passed. ## Harnesses Run in the build fence with `DISPLAY=:0 HORIZON_E2E_HEADLESS=1`, `tools/parity.py` on the harnesses that cover the moved code (the full `--changed` set of 253 is left to CI): - Pass: `entity_fluid`, `living_fluid`, `living_fall`, `living_motion`, `living_air`. - `mob_ai`: 267 of 272 scenarios match, 126862 of 127179 mob-ticks. The five that diverge (four `horse_age_*_noai_True_locked_*` scenarios on random-draw count, and `sniffer_baby` on age) are the same five, with the same counts, on origin/main at the base of this branch (run fresh, in a separate worktree), so this change does not cause them. - `tools/pr_ready.py --quick`: rustfmt, clippy, 614 Python tests and 1476 `horizon-client-lib` tests pass. Left alone: carts and boats; the lead pull difference of 1e-4; items and armor stands in columns (#7669, #7701); minecart arrival at a portal (#7598). Proved by script against the real 26.3 server; no human played this change. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Valhalla, against origin/main at 31f83499b, 10 min 27 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +74 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (30 s) | | rustfmt | ✅ (7 s) | | Rust | ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 44 s) | | tests: horizon-client-lib | ✅ 1491 passed (7 min 42 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 253 affected, to run in CI (--quick): anvil_turtle_egg, armor_stand_turtle_egg, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer and 241 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7873
No description provided.