[PR #1257] [MERGED] Fix #1222: single player runs in the frame again until server players have vehicles #3461

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

📋 Pull Request Information

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

Base: main ← Head: fix/1222-boat-interact


📝 Commits (1)

  • c0fd8da Fix #1222: single player runs in the frame again until server players have vehicles

📊 Changes

3 files changed (+67 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+6 -5)
📝 crates/horizon-client/src/game/integrated.rs (+4 -3)
📝 tools/lan_e2e.py (+57 -4)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #1222

What

Since #1114, single player runs on its server thread by default, so the window is a network player of its own world. A server's players can't use vehicles yet, at either end:

  • Client. remote_start_attack and remote_use_entity send Attack and Interact only for mobs. Boats, minecarts, item frames, armor stands and paintings under the crosshair send nothing.
  • Server. look_at_entity aims a player's attack or use only at mobs and dragon parts. Anything else returns early.
  • Riding. Neither side has it. The client doesn't handle SetPassengers for its own player, and the protocol has no MoveVehicle or PaddleBoat packets.

So since #1114 nobody can board or break a boat in single player, and the same goes for minecarts. That is a regression from today's change. #1119 is render-only and not involved.

This PR makes the server thread opt-in again, as it was before #1114 (--server-thread or HORIZON_SERVER_THREAD=1; --no-server-thread still works). Single player runs in the frame by default, where boats and minecarts work.

Turning the server thread back on by default needs vehicles for server players, which is a feature of its own: interact and attack on non-mob entities from the client, the server aiming at them, then riding (SetPassengers on the client, plus MoveVehicle, PaddleBoat and PlayerInput dismount). That would also give vehicles to LAN guests and to clients of a dedicated server, who have never had them. It is several hours of work and not for tonight. #1210–#1213 (LAN players in different dimensions) still apply on the server thread when it is on.

Test

lan_e2e boats: the host (the single player) right-clicks a boat on water, rides it, sneaks out, then breaks it with its fists.

  • Without --server-thread, the host now runs the game's own default instead of forcing the frame, so the check covers what players get. If the default goes back to the server thread before it has vehicles, this check fails.

How tested (Mac mini, main 02260048)

  • On main, --server-thread: boats: FAIL right-clicking the boat 313: riding None. This reproduces #1222.
  • On main, in the frame: boats: PASS.
  • With this PR and the game's default (no HORIZON_SERVER_THREAD): boats: PASS {'boat': 220, 'rode': True, 'broken': True}, tab: PASS.
  • cargo fmt --check and cargo clippy -p horizon-client --all-targets -- -D warnings: OK.

Needs Ludovic

A decision. This PR undoes the default from #1114, which he approved. The alternative is to hold Stable until server players have vehicles.

🤖 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/1257 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/1222-boat-interact` --- ### 📝 Commits (1) - [`c0fd8da`](https://github.com/horizon-rust/horizon/commit/c0fd8dabfd96389d23cfd0d2874ae55ef6f4de5f) Fix #1222: single player runs in the frame again until server players have vehicles ### 📊 Changes **3 files changed** (+67 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -5) 📝 `crates/horizon-client/src/game/integrated.rs` (+4 -3) 📝 `tools/lan_e2e.py` (+57 -4) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1222 ## What Since #1114, single player runs on its server thread by default, so the window is a network player of its own world. A server's players can't use vehicles yet, at either end: - **Client.** `remote_start_attack` and `remote_use_entity` send `Attack` and `Interact` only for mobs. Boats, minecarts, item frames, armor stands and paintings under the crosshair send nothing. - **Server.** `look_at_entity` aims a player's attack or use only at mobs and dragon parts. Anything else returns early. - **Riding.** Neither side has it. The client doesn't handle `SetPassengers` for its own player, and the protocol has no `MoveVehicle` or `PaddleBoat` packets. So since #1114 nobody can board or break a boat in single player, and the same goes for minecarts. That is a regression from today's change. #1119 is render-only and not involved. This PR makes the server thread opt-in again, as it was before #1114 (`--server-thread` or `HORIZON_SERVER_THREAD=1`; `--no-server-thread` still works). Single player runs in the frame by default, where boats and minecarts work. Turning the server thread back on by default needs vehicles for server players, which is a feature of its own: interact and attack on non-mob entities from the client, the server aiming at them, then riding (`SetPassengers` on the client, plus `MoveVehicle`, `PaddleBoat` and `PlayerInput` dismount). That would also give vehicles to LAN guests and to clients of a dedicated server, who have never had them. It is several hours of work and not for tonight. #1210–#1213 (LAN players in different dimensions) still apply on the server thread when it is on. ## Test `lan_e2e boats`: the host (the single player) right-clicks a boat on water, rides it, sneaks out, then breaks it with its fists. - Without `--server-thread`, the host now runs the game's own default instead of forcing the frame, so the check covers what players get. If the default goes back to the server thread before it has vehicles, this check fails. ## How tested (Mac mini, main 02260048) - On main, `--server-thread`: `boats: FAIL right-clicking the boat 313: riding None`. This reproduces #1222. - On main, in the frame: `boats: PASS`. - With this PR and the game's default (no `HORIZON_SERVER_THREAD`): `boats: PASS {'boat': 220, 'rode': True, 'broken': True}`, `tab: PASS`. - `cargo fmt --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings`: OK. ## Needs Ludovic A decision. This PR undoes the default from #1114, which he approved. The alternative is to hold Stable until server players have vehicles. 🤖 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:09: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#3461
No description provided.