[PR #6491] [MERGED] Water streams push minecarts and boats, and bubble columns move minecarts #6908

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

📋 Pull Request Information

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

Base: main ← Head: fix/fluid-push-vehicles


📝 Commits (10+)

  • 7c59e6e Minecarts and boats are pushed by flowing fluid; carts by bubble columns
  • f4e15c9 Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles
  • 36a87d0 Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles
  • 6c1d39a Push minecarts through the shared fluid update; boats keep a null first status
  • 40b190f Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles
  • b7f8df9 Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles
  • 858384b Carts: reset fall distance in water and bubble columns, push carts before the fluid push; boats: refreshed status counts as known
  • 285babf Port map: bubble columns reach carts now; note the new-minecart order
  • 21b256b Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles
  • 1bdee6a Merge main into #6491

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/boats.rs (+10 -1)
📝 crates/horizon-client/src/game/minecarts.rs (+49 -9)
📝 tools/port_map/game2-007.tsv (+1 -1)

📄 Description

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

What and why

Minecarts ignored flowing water and lava, and also ignored bubble columns. In vanilla every entity that does not opt out is pushed by Entity.updateFluidInteraction (0.014 for water, 0.007 / 0.0023333 for lava) and lifted or dragged by a bubble column. Boats are already pushed since #6453; carts were not, so an empty cart sat still in a stream.

Changed: tick_cart calls the existing horizon_client::entities::update_entity_fluids (no second copy of the fluid push); minecarts apply the bubble column after each move and at the end of the tick, like vanilla's applyEffectsFromBlocks; a cart's "in water" flag now comes from that fluid update (as Entity.isInWater) instead of a point test, so its first tick falls at the dry rate.

Also kept: a boat's previous status starts as "none" in vanilla (oldStatus is null), so its first tick is not the "air to water" case. Horizon started it as "in air", so a boat spawned in water snapped up to the surface on tick 1. Still needed after #6453: without it the scene's bubble-column boat is 2.17 blocks off vanilla and the stream boat is off by 0.009.

Fixes #6489

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

Entity.updateFluidInteraction / updateFluidHeightAndDoFluidPushing, Entity.isPushedByFluid (not overridden by AbstractMinecart or AbstractBoat), AbstractMinecart.tick (behavior.tick() then updateFluidInteraction()), AbstractMinecart.getDefaultGravity (water 0.005, else 0.04), Entity.move ending with applyEffectsFromBlocks, BubbleColumnBlock.entityInside, AbstractBoat.tick (oldStatus).

Test

Side-by-side flow_vehicles scene (empty minecart and empty oak boat in a water stream, and in separate soul sand bubble columns; ticks frozen, 10 steps, tolerance 1e-5). Without the fix the scene fails; with it every probed value matches.

Numbers

Probed values matching vanilla (132 values, Pos and Motion of 6 entities over 10 ticks), run after merging main with #6453:

main this change
matching values 52 132

Position after 10 ticks of the carts (x for the stream, y for the column) and boats:

entity vanilla main this change
minecart in stream, x -4.3475 -4.5 -4.3475
minecart in bubble column, y 105.9046 100.9624 105.9046
boat in stream, x 0.0214 0.0305 0.0214
boat in bubble column, y 103.3622 105.4450 103.3622

Without only the boat status change (carts fixed): 92 of 132 match; the boat rows above are the ones that differ.

What wasn't compared

  • Falling blocks: a no-gravity falling block in the stream and in the column already matched vanilla (it is not pushed by the stream in vanilla either); falling blocks with gravity were not run.
  • Carts with a rider and carts on rails in a stream were not run; rockets and other projectiles were not run.
  • Lava currents use the same code but were not run.
  • Not run through the game window.

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 db34ce484, 5 min 6 s)

Check Result
Scope ✅ 3 files, +42 −8
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 596 passed (34 s)
rustfmt ✅ (10 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 ✅ (2 min 25 s)
tests: horizon-client ✅ 593 passed (1 min 51 s)
doc tests ✅ 0 passed (2 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 ➖ 322 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, block_removal, boat_authority, boat_paddle_reset, boat_submerged, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry and 310 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/6491 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/fluid-push-vehicles` --- ### 📝 Commits (10+) - [`7c59e6e`](https://github.com/horizon-rust/horizon/commit/7c59e6e02a8c4c4cc10330a336db6d49aa7799db) Minecarts and boats are pushed by flowing fluid; carts by bubble columns - [`f4e15c9`](https://github.com/horizon-rust/horizon/commit/f4e15c90c6e8d0b5b1554f0982e3d36c7b6acc82) Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles - [`36a87d0`](https://github.com/horizon-rust/horizon/commit/36a87d0147724c90dd1e03346d1cdb4caba2c7e6) Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles - [`6c1d39a`](https://github.com/horizon-rust/horizon/commit/6c1d39a4d4f1cd54a8761af99638784ccfd49ddc) Push minecarts through the shared fluid update; boats keep a null first status - [`40b190f`](https://github.com/horizon-rust/horizon/commit/40b190f497c485f28456257d25ee5e5cacb01465) Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles - [`b7f8df9`](https://github.com/horizon-rust/horizon/commit/b7f8df9510ec025f5e7d6194f4d06296a7dea056) Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles - [`858384b`](https://github.com/horizon-rust/horizon/commit/858384befbe589e276a6db7851b8830f90ed1aa6) Carts: reset fall distance in water and bubble columns, push carts before the fluid push; boats: refreshed status counts as known - [`285babf`](https://github.com/horizon-rust/horizon/commit/285babf9c2bf6e048f0faacdebe922653413d167) Port map: bubble columns reach carts now; note the new-minecart order - [`21b256b`](https://github.com/horizon-rust/horizon/commit/21b256b2d25da71c8b7c50bc681ae16b4539c31b) Merge remote-tracking branch 'origin/main' into fix/fluid-push-vehicles - [`1bdee6a`](https://github.com/horizon-rust/horizon/commit/1bdee6af8d8e61372517cf908c7683822e28ee8f) Merge main into #6491 ### 📊 Changes **3 files changed** (+60 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boats.rs` (+10 -1) 📝 `crates/horizon-client/src/game/minecarts.rs` (+49 -9) 📝 `tools/port_map/game2-007.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why Minecarts ignored flowing water and lava, and also ignored bubble columns. In vanilla every entity that does not opt out is pushed by `Entity.updateFluidInteraction` (0.014 for water, 0.007 / 0.0023333 for lava) and lifted or dragged by a bubble column. Boats are already pushed since #6453; carts were not, so an empty cart sat still in a stream. Changed: `tick_cart` calls the existing `horizon_client::entities::update_entity_fluids` (no second copy of the fluid push); minecarts apply the bubble column after each move and at the end of the tick, like vanilla's `applyEffectsFromBlocks`; a cart's "in water" flag now comes from that fluid update (as `Entity.isInWater`) instead of a point test, so its first tick falls at the dry rate. Also kept: a boat's previous status starts as "none" in vanilla (`oldStatus` is null), so its first tick is not the "air to water" case. Horizon started it as "in air", so a boat spawned in water snapped up to the surface on tick 1. Still needed after #6453: without it the scene's bubble-column boat is 2.17 blocks off vanilla and the stream boat is off by 0.009. Fixes #6489 ## 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 `Entity.updateFluidInteraction` / `updateFluidHeightAndDoFluidPushing`, `Entity.isPushedByFluid` (not overridden by `AbstractMinecart` or `AbstractBoat`), `AbstractMinecart.tick` (`behavior.tick()` then `updateFluidInteraction()`), `AbstractMinecart.getDefaultGravity` (water 0.005, else 0.04), `Entity.move` ending with `applyEffectsFromBlocks`, `BubbleColumnBlock.entityInside`, `AbstractBoat.tick` (`oldStatus`). ## Test Side-by-side `flow_vehicles` scene (empty minecart and empty oak boat in a water stream, and in separate soul sand bubble columns; ticks frozen, 10 steps, tolerance 1e-5). Without the fix the scene fails; with it every probed value matches. ## Numbers Probed values matching vanilla (132 values, Pos and Motion of 6 entities over 10 ticks), run after merging main with #6453: | | main | this change | |---|---|---| | matching values | 52 | 132 | Position after 10 ticks of the carts (x for the stream, y for the column) and boats: | entity | vanilla | main | this change | |---|---|---|---| | minecart in stream, x | -4.3475 | -4.5 | -4.3475 | | minecart in bubble column, y | 105.9046 | 100.9624 | 105.9046 | | boat in stream, x | 0.0214 | 0.0305 | 0.0214 | | boat in bubble column, y | 103.3622 | 105.4450 | 103.3622 | Without only the boat status change (carts fixed): 92 of 132 match; the boat rows above are the ones that differ. ## What wasn't compared - Falling blocks: a no-gravity falling block in the stream and in the column already matched vanilla (it is not pushed by the stream in vanilla either); falling blocks with gravity were not run. - Carts with a rider and carts on rails in a stream were not run; rockets and other projectiles were not run. - Lava currents use the same code but were not run. - Not run through the game window. 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 db34ce484, 5 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +42 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 596 passed (34 s) | | rustfmt | ✅ (10 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 | ✅ (2 min 25 s) | | tests: horizon-client | ✅ 593 passed (1 min 51 s) | | doc tests | ✅ 0 passed (2 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 | ➖ 322 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, block_removal, boat_authority, boat_paddle_reset, boat_submerged, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry and 310 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>
bsakaguchi 2026-11-03 06:28:58 +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#6908
No description provided.