[PR #6449] [CLOSED] Water and lava currents push boats #6880

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6449
Author: @breachato
Created: 11/1/2026
Status: ❌ Closed

Base: main ← Head: fix/6435-boat-water-current


📝 Commits (1)

  • 40fc91c Water and lava currents push boats

📊 Changes

3 files changed (+26 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+1 -0)
📝 crates/horizon-client/src/entities/fluids.rs (+14 -0)
📝 crates/horizon-client/src/game/boats.rs (+11 -0)

📄 Description

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

What and why

Fixes #6435.

GrimAC on Paper 26.3 flagged Simulation for a Horizon client paddling a boat through a flowing trench (21 alerts), but not in still water, and not for a stock client in the same trench. The issue's table points at movement in flowing water specifically.

Vanilla's AbstractBoat.tick runs VehicleEntity.tick → Entity.tick → Entity.baseTick, which calls updateInWaterStateAndDoFluidPushing / updateFluidHeightAndDoFluidPushing(WATER, 0.014) and the lava one. AbstractBoat doesn't override isPushedByFluid, so the current pushes the boat, after getStatus and before floatBoat and the move (26.3 bytecode of AbstractBoat.tick). Horizon's tick_boat had no current at all: boats.rs never pushed a boat by a fluid's flow. In still water the flow is zero, which is why only flowing water differed.

tick_boat now pushes the boat with entities::push_by_currents, a public wrapper over the update_entity_fluids helper that dropped items and armor stands already use (water at 0.014, lava at 0.007 / 0.0023…), with the boat's box and its eye at height * 0.85. It sits after the status and the hurt/damage countdowns and before floatBoat, matching where VehicleEntity.tick runs in vanilla's order. tick_boat serves the server's boats, the boat this client drives, and the boat a player drives on a server (remote_vehicles.rs), so all three get it.

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

  • net.minecraft.world.entity.vehicle.boat.AbstractBoat.tick: getStatus, then VehicleEntity.tick, then floatBoat, controlBoat, move.
  • net.minecraft.world.entity.Entity.baseTick → updateInWaterStateAndDoFluidPushing, updateFluidHeightAndDoFluidPushing; isPushedByFluid isn't overridden by AbstractBoat.

Not re-run against GrimAC here (no Paper server on this machine): the issue's repro (a flowing trench, forward paddle for 3 s, GrimAC verbose) is the check. Existing boat tests and harnesses in still water are unaffected, as the flow there is zero.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-G0M27UC, against upstream/main at 88c4211d5, 6 min 11 s)

Check Result
Scope ✅ 3 files, +26 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (2 min 38 s)
rustfmt ✅ (13 s)
clippy ✅ (1 min 42 s)
tests: horizon-client, horizon-client-lib ❌ 583 passed, 2 failed (1 min 27 s)
doc tests ✅ 0 passed (7 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)

The two failing tests, native_loot_kinds_stay_hookable and native_breathing_stays_hookable, are unrelated: they look for " } " in a source file a Windows core.autocrlf checkout has in CRLF (#6372, fixed in #6375). CI (LF) is unaffected.

🤖 Generated with Claude Code


🔄 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/6449 **Author:** [@breachato](https://github.com/breachato) **Created:** 11/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/6435-boat-water-current` --- ### 📝 Commits (1) - [`40fc91c`](https://github.com/horizon-rust/horizon/commit/40fc91cdc35f8106aed989ce546bc35b078fc359) Water and lava currents push boats ### 📊 Changes **3 files changed** (+26 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+1 -0) 📝 `crates/horizon-client/src/entities/fluids.rs` (+14 -0) 📝 `crates/horizon-client/src/game/boats.rs` (+11 -0) </details> ### 📄 Description > 🤖 Opened by breachato's AI agent (Claude Code, Claude Opus 5.5), not by breachato personally. ## What and why Fixes #6435. GrimAC on Paper 26.3 flagged `Simulation` for a Horizon client paddling a boat through a flowing trench (21 alerts), but not in still water, and not for a stock client in the same trench. The issue's table points at movement in flowing water specifically. Vanilla's `AbstractBoat.tick` runs `VehicleEntity.tick` → `Entity.tick` → `Entity.baseTick`, which calls `updateInWaterStateAndDoFluidPushing` / `updateFluidHeightAndDoFluidPushing(WATER, 0.014)` and the lava one. `AbstractBoat` doesn't override `isPushedByFluid`, so the current pushes the boat, after `getStatus` and before `floatBoat` and the move (26.3 bytecode of `AbstractBoat.tick`). Horizon's `tick_boat` had no current at all: `boats.rs` never pushed a boat by a fluid's flow. In still water the flow is zero, which is why only flowing water differed. `tick_boat` now pushes the boat with `entities::push_by_currents`, a public wrapper over the `update_entity_fluids` helper that dropped items and armor stands already use (water at 0.014, lava at 0.007 / 0.0023…), with the boat's box and its eye at `height * 0.85`. It sits after the status and the hurt/damage countdowns and before `floatBoat`, matching where `VehicleEntity.tick` runs in vanilla's order. `tick_boat` serves the server's boats, the boat this client drives, and the boat a player drives on a server (`remote_vehicles.rs`), so all three get it. ## 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 - `net.minecraft.world.entity.vehicle.boat.AbstractBoat.tick`: `getStatus`, then `VehicleEntity.tick`, then `floatBoat`, `controlBoat`, `move`. - `net.minecraft.world.entity.Entity.baseTick` → `updateInWaterStateAndDoFluidPushing`, `updateFluidHeightAndDoFluidPushing`; `isPushedByFluid` isn't overridden by `AbstractBoat`. Not re-run against GrimAC here (no Paper server on this machine): the issue's repro (a flowing trench, forward paddle for 3 s, GrimAC verbose) is the check. Existing boat tests and harnesses in still water are unaffected, as the flow there is zero. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-G0M27UC, against upstream/main at 88c4211d5, 6 min 11 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +26 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (2 min 38 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (1 min 42 s) | | tests: horizon-client, horizon-client-lib | ❌ 583 passed, 2 failed (1 min 27 s) | | doc tests | ✅ 0 passed (7 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) | The two failing tests, `native_loot_kinds_stay_hookable` and `native_breathing_stays_hookable`, are unrelated: they look for `" } "` in a source file a Windows `core.autocrlf` checkout has in CRLF (#6372, fixed in #6375). CI (LF) is unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:33 +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#6880
No description provided.