[PR #1580] [MERGED] Let mobs ride boats, and make boats collide with and push entities #3607

Closed
opened 2026-11-03 04:10:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1580
Author: @levzzz5154
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @ludovic111

Base: main ← Head: feat/boat-passengers


📝 Commits (2)

  • 66235cc Let mobs ride boats, and make boats collide with and push entities
  • 6e8a96a Boats push the player, and startRiding's quiet failures

📊 Changes

14 files changed (+750 additions, -96 deletions)

View changed files

📝 crates/horizon-client/src/collisions.rs (+24 -0)
📝 crates/horizon-client/src/game.rs (+1 -0)
➕ crates/horizon-client/src/game/boat_passengers.rs (+453 -0)
📝 crates/horizon-client/src/game/boats.rs (+89 -16)
📝 crates/horizon-client/src/game/lan_actions.rs (+14 -1)
📝 crates/horizon-client/src/game/lan_vehicles.rs (+10 -9)
📝 crates/horizon-client/src/game/minecarts.rs (+1 -1)
📝 crates/horizon-client/src/game/passengers.rs (+26 -5)
📝 crates/horizon-client/src/game/persist.rs (+88 -54)
📝 crates/horizon-client/src/game/remote.rs (+27 -3)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+9 -4)
📝 crates/horizon-client/src/mobs.rs (+5 -1)
📝 crates/horizon-client/src/mobs/drops.rs (+2 -1)
📝 docs/architecture.md (+1 -1)

📄 Description

🤖 Opened by levzzz's AI agent (Claude Code), not by levzzz themself.

Boats now treat entities as vanilla's AbstractBoat does:

  • Placing: BoatItem.use's noCollision covers entities, so a boat can't be placed overlapping another boat, a minecart, a mob or a player. Before, any number of boats could be placed inside each other.
  • Collisions: a moving boat stops at the entities canVehicleCollide allows (other boats, minecarts, shulkers, pushable mobs and players), but never its own passengers.
  • Pushing: on the server, a boat pushes what it touches (AbstractBoat.push), and mobs and players touching it push it back (LivingEntity.pushEntities). A boat with passengers isn't pushed. A player's share of a push is dropped, as only the server's copy would feel it.
  • Mob passengers: a boat no player steers picks up the living entities that touch it, except those in #cannot_be_pushed_onto_boats or as wide as the boat, while it has a seat and isn't under water. Boats have 2 seats, chest boats 1, and a player always sits in front.
    • Seats follow getPassengerAttachmentPoint; animals in a full boat sit sideways (calculatePassengerBodyYRot).
    • Passengers get out when the boat breaks or stays under water, with a 60-tick boardingCooldown.
    • They're saved under the boat's Passengers.
  • Client seating: the server sends no passenger's position, so clients now seat passengers themselves (boats and mob vehicles).
  • Seats: the player now sits at vanilla's seat on rafts (rideHeight) and in chest boats (0.15 forward).
  • Breaking: a server player breaking a boat with a mob in it hits the boat, not the mob over its middle.

New code is in game/boat_passengers.rs. Not included: mobs' own movement still doesn't collide with entities (boats, shulkers), which is a wider change.

Testing

By hand with horizon-ctl, in-frame and on the server thread:

  • a cow summoned onto a boat gets in, a zombie takes the second seat
  • the player boards in front, drives, gets out, and the mob moves back to the middle seat
  • boats pushed apart; driving into a boat stops and shoves it
  • overlapping placement refused, free placement works
  • breaking the boat drops the mob
  • a world saved with mobs in boats reloads with them seated, across both modes

Parity: server_entities, dedicated_server, dispenser, nether_portal and swimming pass. world_reopen and lan_e2e.py --check boats/riding/mounts/push need vscreen, which this machine lacks, so they're left to CI.

pr_ready.py --quick: rustfmt, clippy, workspace tests (1935), doc tests and launcher checks pass. The diff is about 700 lines (over the ~500 guideline), asked for as one PR.

🤖 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/1580 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/boat-passengers` --- ### 📝 Commits (2) - [`66235cc`](https://github.com/horizon-rust/horizon/commit/66235cc981d0b9cb4414260f31275e7dccfb085d) Let mobs ride boats, and make boats collide with and push entities - [`6e8a96a`](https://github.com/horizon-rust/horizon/commit/6e8a96a7349ea10dfd5a5e4b4ae0f0ab09328eaf) Boats push the player, and startRiding's quiet failures ### 📊 Changes **14 files changed** (+750 additions, -96 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/collisions.rs` (+24 -0) 📝 `crates/horizon-client/src/game.rs` (+1 -0) ➕ `crates/horizon-client/src/game/boat_passengers.rs` (+453 -0) 📝 `crates/horizon-client/src/game/boats.rs` (+89 -16) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+14 -1) 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+10 -9) 📝 `crates/horizon-client/src/game/minecarts.rs` (+1 -1) 📝 `crates/horizon-client/src/game/passengers.rs` (+26 -5) 📝 `crates/horizon-client/src/game/persist.rs` (+88 -54) 📝 `crates/horizon-client/src/game/remote.rs` (+27 -3) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+9 -4) 📝 `crates/horizon-client/src/mobs.rs` (+5 -1) 📝 `crates/horizon-client/src/mobs/drops.rs` (+2 -1) 📝 `docs/architecture.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by levzzz's AI agent (Claude Code), not by levzzz themself. Boats now treat entities as vanilla's `AbstractBoat` does: - **Placing:** `BoatItem.use`'s `noCollision` covers entities, so a boat can't be placed overlapping another boat, a minecart, a mob or a player. Before, any number of boats could be placed inside each other. - **Collisions:** a moving boat stops at the entities `canVehicleCollide` allows (other boats, minecarts, shulkers, pushable mobs and players), but never its own passengers. - **Pushing:** on the server, a boat pushes what it touches (`AbstractBoat.push`), and mobs and players touching it push it back (`LivingEntity.pushEntities`). A boat with passengers isn't pushed. A player's share of a push is dropped, as only the server's copy would feel it. - **Mob passengers:** a boat no player steers picks up the living entities that touch it, except those in `#cannot_be_pushed_onto_boats` or as wide as the boat, while it has a seat and isn't under water. Boats have 2 seats, chest boats 1, and a player always sits in front. - Seats follow `getPassengerAttachmentPoint`; animals in a full boat sit sideways (`calculatePassengerBodyYRot`). - Passengers get out when the boat breaks or stays under water, with a 60-tick `boardingCooldown`. - They're saved under the boat's `Passengers`. - **Client seating:** the server sends no passenger's position, so clients now seat passengers themselves (boats and mob vehicles). - **Seats:** the player now sits at vanilla's seat on rafts (`rideHeight`) and in chest boats (0.15 forward). - **Breaking:** a server player breaking a boat with a mob in it hits the boat, not the mob over its middle. New code is in `game/boat_passengers.rs`. Not included: mobs' own movement still doesn't collide with entities (boats, shulkers), which is a wider change. ## Testing By hand with `horizon-ctl`, in-frame and on the server thread: - a cow summoned onto a boat gets in, a zombie takes the second seat - the player boards in front, drives, gets out, and the mob moves back to the middle seat - boats pushed apart; driving into a boat stops and shoves it - overlapping placement refused, free placement works - breaking the boat drops the mob - a world saved with mobs in boats reloads with them seated, across both modes Parity: `server_entities`, `dedicated_server`, `dispenser`, `nether_portal` and `swimming` pass. `world_reopen` and `lan_e2e.py --check boats/riding/mounts/push` need `vscreen`, which this machine lacks, so they're left to CI. `pr_ready.py --quick`: rustfmt, clippy, workspace tests (1935), doc tests and launcher checks pass. The diff is about 700 lines (over the ~500 guideline), asked for as one PR. 🤖 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 04:10:46 +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#3607
No description provided.