[PR #5063] [MERGED] /ride mounts boats and minecarts #6036

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5063
Author: @ludovicthenot
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/ride-non-mob-vehicles


📝 Commits (5)

  • de01121 C:/Program Files/Git/ride mounts boats and minecarts
  • 90030dd Merge remote-tracking branch 'origin/main' into sweepc-5063
  • baf451a /ride: force the ride as RideCommand.mount does, and fire started_riding
  • 3159ecb Merge origin/main into fix/ride-non-mob-vehicles (main's clippy fix #5304)
  • 839399c Merge origin/main into fix/ride-non-mob-vehicles (main's Python suite fix)

📊 Changes

1 file changed (+59 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/world_cmds.rs (+59 -14)

📄 Description

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

What and why

Part of #4968. /ride <target> mount <vehicle> only took a mob as the vehicle, so boats and minecarts, which Horizon already lets a player ride, were refused with commands.ride.mount.failure.generic.

  • Boats: a player or a mob mounts one with a free seat (AbstractBoat.canAddPassenger, boat_has_room), through the same state as clicking it (riding, or the mob's mount as boat_passengers reads it).
  • Minecarts, of every kind: a player mounts one no other player is in. A mob in a minecart isn't modelled yet (sync_riders lets go of it), so that one still fails.
  • /ride <player> dismount goes through stop_riding, which gets the player off a boat, a minecart or a cushion as well as a mob. It used to call the mob-only dismount_mount.
  • ride_vehicle (Entity.getVehicle) names a minecart as a minecart, so "already riding" and "stopped riding" name it, and the loop check walks it.

Not in this PR: display entities, armor stands, interactions, markers and area effect clouds. Horizon doesn't simulate those as vehicles yet (no seat, no positioning, nothing sent to clients), so they keep the generic failure. That needs its own change, and #4968 stays open for 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

RideCommand.mount calls Entity.startRiding(vehicle, true, true) for any entity that isn't a player. Boats and minecarts take passengers there, as they do from a click.

Tested in the game

A fresh creative world on the server thread, through horizon-ctl (--offscreen): summon the vehicle next to the player, then ride @s mount, ride @s mount again, the player's position, and ride @s dismount:

Vehicle mount again dismount
oak_boat started riding Oak Boat is already riding Oak Boat stopped riding Oak Boat
minecart started riding Minecart is already riding Minecart stopped riding Minecart
chest_minecart started riding Minecart with Chest is already riding Minecart with Chest stopped riding Minecart with Chest
pig (unchanged) started riding Pig is already riding Pig stopped riding Pig
item_display (out of scope) couldn't start riding Item Display (same) is not riding any vehicle

The player's position followed the vehicle each time. ride @e[type=zombie,limit=1] mount @e[type=oak_boat,limit=1] gave "Zombie started riding Oak Boat", then "Zombie is already riding Oak Boat".

Self-check

cargo fmt --check ✅, cargo clippy -p horizon-client --bin horizon-client ✅ (no warnings). tools/pr_ready.py was not run. No unit test: cmd_ride needs a whole Game, which no command test builds.

Label: parity.


🔄 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/5063 **Author:** [@ludovicthenot](https://github.com/ludovicthenot) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/ride-non-mob-vehicles` --- ### 📝 Commits (5) - [`de01121`](https://github.com/horizon-rust/horizon/commit/de01121caecc58726ac13d2271639d5b484dab66) C:/Program Files/Git/ride mounts boats and minecarts - [`90030dd`](https://github.com/horizon-rust/horizon/commit/90030ddcdb5ccc967db5bbcb104394f2a46161d1) Merge remote-tracking branch 'origin/main' into sweepc-5063 - [`baf451a`](https://github.com/horizon-rust/horizon/commit/baf451aa0b7206caad2806af3e3ddde05f47a901) /ride: force the ride as RideCommand.mount does, and fire started_riding - [`3159ecb`](https://github.com/horizon-rust/horizon/commit/3159ecb0cc07dcd19b3218a41a37f10224d5e496) Merge origin/main into fix/ride-non-mob-vehicles (main's clippy fix #5304) - [`839399c`](https://github.com/horizon-rust/horizon/commit/839399c3739de7593c35be8f55f55c10f9b151d4) Merge origin/main into fix/ride-non-mob-vehicles (main's Python suite fix) ### 📊 Changes **1 file changed** (+59 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+59 -14) </details> ### 📄 Description > 🤖 Opened by ludovicthenot's AI agent (Claude Code, Claude Opus 5.5), not by ludovicthenot personally. ## What and why Part of #4968. `/ride <target> mount <vehicle>` only took a mob as the vehicle, so boats and minecarts, which Horizon already lets a player ride, were refused with `commands.ride.mount.failure.generic`. - **Boats**: a player or a mob mounts one with a free seat (`AbstractBoat.canAddPassenger`, `boat_has_room`), through the same state as clicking it (`riding`, or the mob's mount as `boat_passengers` reads it). - **Minecarts**, of every kind: a player mounts one no other player is in. A mob in a minecart isn't modelled yet (`sync_riders` lets go of it), so that one still fails. - **`/ride <player> dismount`** goes through `stop_riding`, which gets the player off a boat, a minecart or a cushion as well as a mob. It used to call the mob-only `dismount_mount`. - **`ride_vehicle`** (`Entity.getVehicle`) names a minecart as a minecart, so "already riding" and "stopped riding" name it, and the loop check walks it. Not in this PR: display entities, armor stands, interactions, markers and area effect clouds. Horizon doesn't simulate those as vehicles yet (no seat, no positioning, nothing sent to clients), so they keep the generic failure. That needs its own change, and #4968 stays open for 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 `RideCommand.mount` calls `Entity.startRiding(vehicle, true, true)` for any entity that isn't a player. Boats and minecarts take passengers there, as they do from a click. ## Tested in the game A fresh creative world on the server thread, through `horizon-ctl` (`--offscreen`): summon the vehicle next to the player, then `ride @s mount`, `ride @s mount` again, the player's position, and `ride @s dismount`: | Vehicle | mount | again | dismount | | --- | --- | --- | --- | | `oak_boat` | started riding Oak Boat | is already riding Oak Boat | stopped riding Oak Boat | | `minecart` | started riding Minecart | is already riding Minecart | stopped riding Minecart | | `chest_minecart` | started riding Minecart with Chest | is already riding Minecart with Chest | stopped riding Minecart with Chest | | `pig` (unchanged) | started riding Pig | is already riding Pig | stopped riding Pig | | `item_display` (out of scope) | couldn't start riding Item Display | (same) | is not riding any vehicle | The player's position followed the vehicle each time. `ride @e[type=zombie,limit=1] mount @e[type=oak_boat,limit=1]` gave "Zombie started riding Oak Boat", then "Zombie is already riding Oak Boat". ## Self-check `cargo fmt --check` ✅, `cargo clippy -p horizon-client --bin horizon-client` ✅ (no warnings). `tools/pr_ready.py` was not run. No unit test: `cmd_ride` needs a whole `Game`, which no command test builds. Label: `parity`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:47 +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#6036
No description provided.