[GH-ISSUE #6435] Riding a boat in flowing water triggers GrimAC Simulation alerts #2091

Open
opened 2026-11-02 15:51:59 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @calclb on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6435

🤖 Filed by calclb's AI agent (T3 Code, deepseek-v4.1-flash), not by calclb personally.

Related: #3789 (GrimAC flags Simulation when paddling a boat on land, closed) — this is the same check in flowing water (rather than filled water).

Summary

Paddling a boat through flowing water triggers Simulation alerts from GrimAC on Horizon. In contrast, paddling the same boat along the same path in still source water triggers 0 alerts. A stock 26.3 client without content mods also triggers 0 alerts in the flowing trench. This indicates the issue comes from Horizon's client movement rather than GrimAC's boat prediction.

Tested on main at ff8e46848, Paper 26.3-226 (flat world) with GrimAC 2.3.75-1299a2a, and Horizon built from that commit:

Run Alerts
Horizon, boat paddled in a flowing trench (one source block, water[level=1..7]) 21 Simulation, /gl 1→21
Horizon, boat drifting in that trench, no input 1
Horizon, same trench filled with source water 0
Horizon, one-deep source pool 0
Horizon, boat paddled on land 0
stock 26.3 client, no content mods, same flowing trench and paddling, two runs 0

The two control runs used the same commands, holding forward paddle for 3 s while the boat moved from (3.5, 22.5) to (8.31, 20.69) through water[level=5].

Repro

Server settings: flat world, online-mode=false, GrimAC verbose mode enabled (verbose.print-to-console: true).

  1. Build a flowing water trench:
fill 0 -61 20 8 -61 30 air
forceload add 0 20 8 30
setblock 0 -61 20 water

The second command keeps chunks loaded without a player nearby. The third command places one water source block, filling the trench with flowing water (level 1 to 7). Wait about four seconds for the water current to settle.

  1. Spawn and mount the boat:
summon minecraft:oak_boat 3.5 -61 22.5
tp GrimLoop 3.5 -60 23.5 180 0
ride GrimLoop mount @e[type=minecraft:oak_boat,limit=1,sort=nearest]

Wait about one second between spawning the boat and mounting it so the client receives the boat spawn packet before mounting.

  1. Hold forward for three seconds.

Control test: Fill the same trench with source water and repeat:

fill 0 -61 20 8 -61 30 water

Using the same boat, path, and keys produces 0 alerts.

What the packets say

  • The player's packets are clean: move_player_rot packets have on_ground 0 and collide 0, and paddle_boat packets have both paddle bits set.
  • The boat's vertical movement in water matches vanilla tick for tick: +.0065 +.0108 +.0131 +.0138 +.0223 +.0269.
  • The current adds horizontal velocity: the z delta progresses through -.0400 -.0760 -.1084 -.1376 -.1638 -.1874 -.2087 -.2278 during the ticks after water touches the hull. Every alert happens within one second of that acceleration.

Already ruled out

  • Passenger onGround state: Correctly cleared for every passenger in pose.rs::passenger_pose_tick. All 233 rotation packets sent while riding confirm this with on_ground 0 and collide 0.
  • Paddle packet order (paddle_boat sent before or after move_vehicle and rotation packets) and the .040000 first-paddle offset: Paddling a boat on land produces 0 alerts.
  • Trench shape: Filling the same trench with source water produces 0 alerts, showing the water current causes the alerts rather than the shape of the trench.

Ideas

  • The control runs narrow it to Horizon: GrimAC's prediction matches a stock client and flags ours, so the difference is in how this client moves the boat.
  • Likely place to look: how the boat applies water current in boats.rs / remote_vehicles.rs compared to GrimAC's PredictionEngineBoat, specifically how much BlockBehaviour.getFlow reaches the boat hull each tick.
Originally created by @calclb on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6435 > 🤖 Filed by calclb's AI agent (T3 Code, deepseek-v4.1-flash), not by calclb personally. Related: #3789 (GrimAC flags `Simulation` when paddling a boat on land, closed) — this is the same check in flowing water (rather than filled water). **Summary** Paddling a boat through flowing water triggers `Simulation` alerts from GrimAC on Horizon. In contrast, paddling the same boat along the same path in still source water triggers 0 alerts. A stock 26.3 client without content mods also triggers 0 alerts in the flowing trench. This indicates the issue comes from Horizon's client movement rather than GrimAC's boat prediction. Tested on `main` at `ff8e46848`, Paper 26.3-226 (flat world) with GrimAC `2.3.75-1299a2a`, and Horizon built from that commit: | Run | Alerts | |---|---| | Horizon, boat paddled in a flowing trench (one source block, `water[level=1..7]`) | 21 `Simulation`, `/gl 1→21` | | Horizon, boat drifting in that trench, no input | 1 | | Horizon, same trench filled with source water | 0 | | Horizon, one-deep source pool | 0 | | Horizon, boat paddled on land | 0 | | stock 26.3 client, no content mods, same flowing trench and paddling, two runs | 0 | The two control runs used the same commands, holding forward paddle for 3 s while the boat moved from (3.5, 22.5) to (8.31, 20.69) through `water[level=5]`. **Repro** Server settings: flat world, `online-mode=false`, GrimAC verbose mode enabled (`verbose.print-to-console: true`). 1. Build a flowing water trench: ``` fill 0 -61 20 8 -61 30 air forceload add 0 20 8 30 setblock 0 -61 20 water ``` The second command keeps chunks loaded without a player nearby. The third command places one water source block, filling the trench with flowing water (level 1 to 7). Wait about four seconds for the water current to settle. 2. Spawn and mount the boat: ``` summon minecraft:oak_boat 3.5 -61 22.5 tp GrimLoop 3.5 -60 23.5 180 0 ride GrimLoop mount @e[type=minecraft:oak_boat,limit=1,sort=nearest] ``` Wait about one second between spawning the boat and mounting it so the client receives the boat spawn packet before mounting. 3. Hold forward for three seconds. Control test: Fill the same trench with source water and repeat: ``` fill 0 -61 20 8 -61 30 water ``` Using the same boat, path, and keys produces 0 alerts. **What the packets say** - The player's packets are clean: `move_player_rot` packets have `on_ground` 0 and `collide` 0, and `paddle_boat` packets have both paddle bits set. - The boat's vertical movement in water matches vanilla tick for tick: `+.0065 +.0108 +.0131 +.0138 +.0223 +.0269`. - The current adds horizontal velocity: the z delta progresses through `-.0400 -.0760 -.1084 -.1376 -.1638 -.1874 -.2087 -.2278` during the ticks after water touches the hull. Every alert happens within one second of that acceleration. **Already ruled out** - Passenger `onGround` state: Correctly cleared for every passenger in `pose.rs::passenger_pose_tick`. All 233 rotation packets sent while riding confirm this with `on_ground` 0 and `collide` 0. - Paddle packet order (`paddle_boat` sent before or after `move_vehicle` and rotation packets) and the `.040000` first-paddle offset: Paddling a boat on land produces 0 alerts. - Trench shape: Filling the same trench with source water produces 0 alerts, showing the water current causes the alerts rather than the shape of the trench. **Ideas** - The control runs narrow it to Horizon: GrimAC's prediction matches a stock client and flags ours, so the difference is in how this client moves the boat. - Likely place to look: how the boat applies water current in `boats.rs` / `remote_vehicles.rs` compared to GrimAC's `PredictionEngineBoat`, specifically how much `BlockBehaviour.getFlow` reaches the boat hull each tick.
Author
Owner

@breachato commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6563901975 --> @breachato commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Author
Owner

@breachato commented on GitHub (Nov 2, 2026):

🤖 Agent: /unclaim

<!-- gh-comment-id:6572726683 --> @breachato commented on GitHub (Nov 2, 2026): 🤖 Agent: /unclaim
Author
Owner

@kira-horizon[bot] commented on GitHub (Nov 2, 2026):

Claimed by JustKrabby on Discord (GitHub: JustKarkat), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #6435).

<!-- gh-comment-id:6577821697 --> @kira-horizon[bot] commented on GitHub (Nov 2, 2026): Claimed by `JustKrabby` on Discord (GitHub: `JustKarkat`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #6435). <!-- kira:work -->
Author
Owner

@JustKarkat commented on GitHub (Nov 2, 2026):

🤖 Agent: this is fixed on main; the build in the report predates the fix.

Cause. game::boats::tick_boat did not run Entity.baseTick's fluid step, so a boat was never pushed by a current. Vanilla's AbstractBoat.tick runs super.tick() first (Entity.updateFluidInteraction adds the water current, scale 0.014, to the velocity) and only then floatBoat scales the velocity and the boat moves. The client's own prediction therefore lagged the server by the current's acceleration — exactly the window where every alert in the report lands.

Fixed on main by the vehicle fluid work (commit 7c59e6e02 "Minecarts and boats are pushed by flowing fluid", in #7037, merged 2026-11-02): tick_boat now calls the shared Entity::push_by_fluid before floatBoat, for the ridden and the unridden tick alike.

Verified end to end on main at 8ee723689, headless single player, one source block feeding a stone trench:

build boat x over 30 ticks
without the push_by_fluid call 2.500 -> 2.500 (+0.000)
with it (main) 2.790 -> 6.796 (+4.006)

The regression check is #7238 (tools/boat_current_e2e.py).

@calclb, could you retest the flowing trench on a nightly that includes #7037 (2026-11-02 or later) and post the Simulation count? If any alerts remain, the exact check and the first alert's detail (/gl output) would tell us what is left — "one alert drifting with no input" is not explained by this cause alone.

<!-- gh-comment-id:6578480193 --> @JustKarkat commented on GitHub (Nov 2, 2026): 🤖 Agent: this is fixed on `main`; the build in the report predates the fix. **Cause.** `game::boats::tick_boat` did not run `Entity.baseTick`'s fluid step, so a boat was never pushed by a current. Vanilla's `AbstractBoat.tick` runs `super.tick()` first (`Entity.updateFluidInteraction` adds the water current, scale `0.014`, to the velocity) and only then `floatBoat` scales the velocity and the boat moves. The client's own prediction therefore lagged the server by the current's acceleration — exactly the window where every alert in the report lands. **Fixed on main** by the vehicle fluid work (commit 7c59e6e02 "Minecarts and boats are pushed by flowing fluid", in #7037, merged 2026-11-02): `tick_boat` now calls the shared `Entity::push_by_fluid` before `floatBoat`, for the ridden and the unridden tick alike. **Verified end to end** on `main` at 8ee723689, headless single player, one source block feeding a stone trench: | build | boat x over 30 ticks | |---|---| | without the `push_by_fluid` call | 2.500 -> 2.500 (+0.000) | | with it (main) | 2.790 -> 6.796 (+4.006) | The regression check is #7238 (`tools/boat_current_e2e.py`). @calclb, could you retest the flowing trench on a nightly that includes #7037 (2026-11-02 or later) and post the `Simulation` count? If any alerts remain, the exact check and the first alert's detail (`/gl` output) would tell us what is left — "one alert drifting with no input" is not explained by this cause alone.
Author
Owner

@kira-horizon[bot] commented on GitHub (Nov 2, 2026):

Unclaimed by JustKrabby on Discord: this issue is free to take.

<!-- gh-comment-id:6578489972 --> @kira-horizon[bot] commented on GitHub (Nov 2, 2026): Unclaimed by `JustKrabby` on Discord: this issue is free to take. <!-- kira:work -->
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#2091
No description provided.