[PR #3947] [MERGED] Boats in bubble columns as vanilla #5310

Closed
opened 2026-11-03 05:11:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3947
Author: @kacpherek
Created: 10/29/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/split-boats-riding


📝 Commits (10+)

  • b3167c0 Split the bubble column lookup out of bubble_column_push
  • aafa055 Send a boat's bubble time to the clients that track it
  • 883a379 Lift and drag boats inside a bubble column
  • 7c188c9 Start the bubble column countdown when a boat is above one
  • 159e53b Add the bubble column's throw and pull for boats
  • a65f05b Throw or pull a boat after 60 ticks over a bubble column
  • 5972205 Apply a bubble column's throw or pull on the boat a client drives
  • d4e1c8f Read a boat's bubble angle when drawing it
  • 1cd1607 Tilt a boat in a bubble column
  • 4d2a53d Pass a mount's fall damage on to its riders

📊 Changes

6 files changed (+415 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/boats.rs (+358 -1)
📝 crates/horizon-client/src/game/lan_entities.rs (+7 -0)
📝 crates/horizon-client/src/game/lan_vehicles.rs (+4 -1)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)
📝 crates/horizon-client/src/game/remote_objects.rs (+5 -1)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+40 -0)

📄 Description

What and why

  • Find the bubble columns a boat touches with bubble_column_at and BubbleColumn::push, which main now has (#4015): the boat code walks the boat's box the way bubble_column_push does, takes each column's drag and surface, and uses BubbleColumn::push for the lift and drag inside a column. No second lookup or push formula is added.
  • Send a boat's bubble time to the clients that track it: Boats had no AbstractBoat.DATA_ID_BUBBLE_TIME (entity data entry 13). The server now sends it with the other synched boat data, and sends 0 again once it drops back, and a client keeps it on the boat.
  • Lift and drag boats inside a bubble column: A boat inside a bubble column, with water above it, kept its speed. Entity.handleOnInsideBubbleColumn now moves it up to 0.7 or down to -0.3 (AbstractBoat does not override it), twice a tick as AbstractBoat.tick calls applyEffectsFromBlocks twice. Only the side that moves the boat applies it (canSimulateMovement): the server for a boat nobody drives, the client for the boat its player drives. Boats the window does not tick also get their status refreshed, as getStatus runs on every boat.
  • Start the bubble column countdown when a boat is above one: A boat above a bubble column, with nothing over it, had no bubble state and never splashed. AbstractBoat.onAboveBubbleColumn now marks the boat as above the column with its direction, starts the 60 tick bubble time when it is 0 and, one time in a hundred while the boat is not under water, posts the splash game event on the server and plays the splash sound and particle on the client (it does not push the boat, unlike Entity.onAboveBubbleColumn).
  • Add the bubble column's throw and pull for boats: A boat in an up or down column never changed its vertical speed. AbstractBoat.handleBubbleColumnEffect sets it to 0.6 for an up column and subtracts 0.7 for a down one, on the side that moves the boat (canSimulateMovement).
  • Throw or pull a boat after 60 ticks over a bubble column: Boats never rose or sank in a column and a down column let every rider stay. AbstractBoat.tickBubbleColumn now counts the bubble time down on the server while the boat stays above the column, then ejects the riders (down only), broadcasts entity event 71 (down) or 72 (up) and applies the throw or pull. A server's player is let out through guest_vehicle_tick. Clients run the other half: the wobble multiplier grows by 0.05 a tick while the bubble time runs and fades by 0.1 otherwise, and the angle is 10 * sin(0.5 * tickCount) * multiplier.
  • Apply a bubble column's throw or pull on the boat a client drives: The server decides when a column throws or pulls a boat, but the boat its player drives moves on that player's client, so the server's own change does nothing there. AbstractBoat.handleEntityEvent now takes entity events 71 and 72 and runs handleBubbleColumnEffect, which the client applies to the boat it drives.
  • Read a boat's bubble angle when drawing it: AbstractBoatRenderer.extractRenderState copies AbstractBoat.getBubbleAngle(partialTicks), the wobble lerped between the last two ticks, into the render state. boat_geometry now reads it the same way (the drawing follows in the next commit).
  • Tilt a boat in a bubble column: AbstractBoatRenderer.submit turns a boat that is not under water about the axis (1, 0, 1) by the bubble angle when it is not 0 (Mth.equal, 1e-5), after the hurt tilt and before the model's flip, so a boat wobbles while a column works on it.

Vanilla reference

Each commit message names the vanilla method and file it follows.

Self-check

Split out of #3926; the camel, horse and llama riding changes were moved to their own pull request, as the review asked, and the boat code builds on bubble_column_at from #4015 after merging main. rustfmt on changed files; built by CI; not run in game.


🔄 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/3947 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/split-boats-riding` --- ### 📝 Commits (10+) - [`b3167c0`](https://github.com/horizon-rust/horizon/commit/b3167c0351a1006adaad552029c76c42498ff26c) Split the bubble column lookup out of bubble_column_push - [`aafa055`](https://github.com/horizon-rust/horizon/commit/aafa055c21ce6133100724ac4208a4357fec0aa6) Send a boat's bubble time to the clients that track it - [`883a379`](https://github.com/horizon-rust/horizon/commit/883a379bbb571d18765b9182ad0f4dcb3fae8834) Lift and drag boats inside a bubble column - [`7c188c9`](https://github.com/horizon-rust/horizon/commit/7c188c9dbd5cfdcd3db8bec3f084b259e3f5bcce) Start the bubble column countdown when a boat is above one - [`159e53b`](https://github.com/horizon-rust/horizon/commit/159e53b81b9e53d8065aacb996a05404c7198e62) Add the bubble column's throw and pull for boats - [`a65f05b`](https://github.com/horizon-rust/horizon/commit/a65f05b566307cf863075cd5cbfbc6b67ddb8047) Throw or pull a boat after 60 ticks over a bubble column - [`5972205`](https://github.com/horizon-rust/horizon/commit/597220519e6102ae545088e8acf8f53cd3e63595) Apply a bubble column's throw or pull on the boat a client drives - [`d4e1c8f`](https://github.com/horizon-rust/horizon/commit/d4e1c8fef0c1fff9f520c742b407beae6ec5891e) Read a boat's bubble angle when drawing it - [`1cd1607`](https://github.com/horizon-rust/horizon/commit/1cd1607d2a1dcbadfddf9a81c71557bc90453f27) Tilt a boat in a bubble column - [`4d2a53d`](https://github.com/horizon-rust/horizon/commit/4d2a53d739d3b07168516c227622b8a80e76486c) Pass a mount's fall damage on to its riders ### 📊 Changes **6 files changed** (+415 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boats.rs` (+358 -1) 📝 `crates/horizon-client/src/game/lan_entities.rs` (+7 -0) 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+4 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+5 -1) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+40 -0) </details> ### 📄 Description ## What and why - Find the bubble columns a boat touches with `bubble_column_at` and `BubbleColumn::push`, which main now has (#4015): the boat code walks the boat's box the way `bubble_column_push` does, takes each column's `drag` and `surface`, and uses `BubbleColumn::push` for the lift and drag inside a column. No second lookup or push formula is added. - Send a boat's bubble time to the clients that track it: Boats had no AbstractBoat.DATA_ID_BUBBLE_TIME (entity data entry 13). The server now sends it with the other synched boat data, and sends 0 again once it drops back, and a client keeps it on the boat. - Lift and drag boats inside a bubble column: A boat inside a bubble column, with water above it, kept its speed. Entity.handleOnInsideBubbleColumn now moves it up to 0.7 or down to -0.3 (AbstractBoat does not override it), twice a tick as AbstractBoat.tick calls applyEffectsFromBlocks twice. Only the side that moves the boat applies it (canSimulateMovement): the server for a boat nobody drives, the client for the boat its player drives. Boats the window does not tick also get their status refreshed, as getStatus runs on every boat. - Start the bubble column countdown when a boat is above one: A boat above a bubble column, with nothing over it, had no bubble state and never splashed. AbstractBoat.onAboveBubbleColumn now marks the boat as above the column with its direction, starts the 60 tick bubble time when it is 0 and, one time in a hundred while the boat is not under water, posts the splash game event on the server and plays the splash sound and particle on the client (it does not push the boat, unlike Entity.onAboveBubbleColumn). - Add the bubble column's throw and pull for boats: A boat in an up or down column never changed its vertical speed. AbstractBoat.handleBubbleColumnEffect sets it to 0.6 for an up column and subtracts 0.7 for a down one, on the side that moves the boat (canSimulateMovement). - Throw or pull a boat after 60 ticks over a bubble column: Boats never rose or sank in a column and a down column let every rider stay. AbstractBoat.tickBubbleColumn now counts the bubble time down on the server while the boat stays above the column, then ejects the riders (down only), broadcasts entity event 71 (down) or 72 (up) and applies the throw or pull. A server's player is let out through guest_vehicle_tick. Clients run the other half: the wobble multiplier grows by 0.05 a tick while the bubble time runs and fades by 0.1 otherwise, and the angle is 10 * sin(0.5 * tickCount) * multiplier. - Apply a bubble column's throw or pull on the boat a client drives: The server decides when a column throws or pulls a boat, but the boat its player drives moves on that player's client, so the server's own change does nothing there. AbstractBoat.handleEntityEvent now takes entity events 71 and 72 and runs handleBubbleColumnEffect, which the client applies to the boat it drives. - Read a boat's bubble angle when drawing it: AbstractBoatRenderer.extractRenderState copies AbstractBoat.getBubbleAngle(partialTicks), the wobble lerped between the last two ticks, into the render state. boat_geometry now reads it the same way (the drawing follows in the next commit). - Tilt a boat in a bubble column: AbstractBoatRenderer.submit turns a boat that is not under water about the axis (1, 0, 1) by the bubble angle when it is not 0 (Mth.equal, 1e-5), after the hurt tilt and before the model's flip, so a boat wobbles while a column works on it. ## Vanilla reference Each commit message names the vanilla method and file it follows. ## Self-check Split out of #3926; the camel, horse and llama riding changes were moved to their own pull request, as the review asked, and the boat code builds on `bubble_column_at` from #4015 after merging main. rustfmt on changed files; built by CI; not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:42 +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#5310
No description provided.