[PR #4640] [MERGED] Place a rider ejected by an activator rail beside the cart (#4562) #5745

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4640
Author: @cryingtoilet
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/4562-activator-rail-eject


📝 Commits (1)

  • d049c7a Place a rider ejected by an activator rail beside the cart

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/minecarts.rs (+6 -0)

📄 Description

🤖 Opened by cryingtoilet's AI agent (OpenCode, DeepSeek V4.1 Flash), not by cryingtoilet personally.

What and why

A rider crossing a powered activator rail came out of the cart in place instead of being placed on the nearest block. activate_cart ported the hurt part of AbstractMinecart.activateMinecart and cleared self.riding, but the ejectPassengers() half was missing: tick_cart_riding still left the player at the cart's seat position.

tick_cart_riding now runs dismount_cart, Horizon's getDismountLocationForPassenger, when the cart tick cleared the ride. The same function serves the window's player in-frame and a server player during as_guest, so single player on the server thread and LAN guests both get the placement.

Fixes #4562.

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

  • AbstractMinecart.activateMinecart: on a powered activator rail, ejectPassengers() then the hurt animation.
  • Entity.getDismountLocationForPassenger / ServerPlayer.dismountTo: the first safe spot beside the vehicle, else on top of it.
  • lan_vehicles.rs already documents that a server player's cart ticks through tick_cart_riding during as_guest.

Self-check

pr_ready (tools/pr_ready.py --quick against origin/main at 34118b285):

Check Result
Scope ✅ 1 files, +6 −0
Public tree ✅
Python tests ✅ 481 passed
rustfmt ✅
clippy ✅
tests: horizon-client ✅ 1096 passed
doc tests ✅

Not run end to end: this checkout has no prepared vanilla resources in .local/, so tools/lan_e2e.py cannot start a game here. CI's parity job picks the harnesses for game/minecarts.rs.

Screenshots

No before/after capture available locally. The player should land on the block beside the cart when a powered activator rail ejects it.


🔄 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/4640 **Author:** [@cryingtoilet](https://github.com/cryingtoilet) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/4562-activator-rail-eject` --- ### 📝 Commits (1) - [`d049c7a`](https://github.com/horizon-rust/horizon/commit/d049c7a1750d2c34f6bf2d4a390cf77f7534892b) Place a rider ejected by an activator rail beside the cart ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/minecarts.rs` (+6 -0) </details> ### 📄 Description > 🤖 Opened by cryingtoilet's AI agent (OpenCode, DeepSeek V4.1 Flash), not by cryingtoilet personally. ## What and why A rider crossing a powered activator rail came out of the cart in place instead of being placed on the nearest block. `activate_cart` ported the hurt part of `AbstractMinecart.activateMinecart` and cleared `self.riding`, but the `ejectPassengers()` half was missing: `tick_cart_riding` still left the player at the cart's seat position. `tick_cart_riding` now runs `dismount_cart`, Horizon's `getDismountLocationForPassenger`, when the cart tick cleared the ride. The same function serves the window's player in-frame and a server player during `as_guest`, so single player on the server thread and LAN guests both get the placement. Fixes #4562. ## 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 - `AbstractMinecart.activateMinecart`: on a powered activator rail, `ejectPassengers()` then the hurt animation. - `Entity.getDismountLocationForPassenger` / `ServerPlayer.dismountTo`: the first safe spot beside the vehicle, else on top of it. - `lan_vehicles.rs` already documents that a server player's cart ticks through `tick_cart_riding` during `as_guest`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` against origin/main at 34118b285): | Check | Result | | --- | --- | | Scope | ✅ 1 files, +6 −0 | | Public tree | ✅ | | Python tests | ✅ 481 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 1096 passed | | doc tests | ✅ | Not run end to end: this checkout has no prepared vanilla resources in `.local/`, so `tools/lan_e2e.py` cannot start a game here. CI's parity job picks the harnesses for `game/minecarts.rs`. ## Screenshots No before/after capture available locally. The player should land on the block beside the cart when a powered activator rail ejects it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:43 +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#5745
No description provided.