Single player runs on its server thread by default again; --in-frame is the opt-out

#1428 made the in-frame world the default while a server's players lagged
behind it (signs, books, totems, keep_inventory and the other [server-thread]
issues). With the fixes of this stack a scripted single player session (walk,
mine, place, inventory, combat, eating, boats, minecarts, chests, furnaces,
beds, chat, signs, books, totems, keep_inventory, fishing, maps, saving and
reopening) gives the same results on the server thread as in the frame.

`--in-frame`, `--no-server-thread` or HORIZON_SERVER_THREAD=0 runs the world
in the frame; `--server-thread` still works. LAN guests, dedicated servers and
the command harness are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-23 23:21:28 +02:00
parent c6ed3112e7
commit a4a101ca9c
4 changed files with 15 additions and 20 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ Start the client.
- `--world`: Open or create this world (a folder under saves) at once
- `--creative`: Creative mode for a new world
- `--join`: Join a friend's world with its invite code
- `--arg`: An extra argument for the game, passed through as-is (repeatable), for example --server-thread
- `--arg`: An extra argument for the game, passed through as-is (repeatable), for example --in-frame
MCP: `play`, then the `game_*` tools.
@@ -143,7 +143,7 @@ MCP: `settings`.
## `horizon-launcher game-args`
Show or set the extra arguments the game starts with (for example --server-thread); quotes group a word with spaces in it.
Show or set the extra arguments the game starts with (for example --in-frame); quotes group a word with spaces in it.
horizon-launcher game-args [ARGS]
+3 -4
View File
@@ -26,10 +26,9 @@ the other dimensions' levels as `Parked` values and swaps one into place (`enter
The packets of a guest are read in its own level's pass (`Hub::tick_level`), so its actions and
commands run with its level in place.
The window's own game (single player's default, `--no-server-thread`, `HORIZON_SERVER_THREAD=0`, and the
command harness) keeps one level, which follows its player (`enter_dimension`). LAN guests of a world run
that way stay in the host's dimension. It is the default again only until the server thread reaches parity
(`--server-thread` or `HORIZON_SERVER_THREAD=1` opts in), so it gets no multi-level work.
The window's own game (`--in-frame`, `--no-server-thread`, `HORIZON_SERVER_THREAD=0`, and the command
harness) keeps one level, which follows its player (`enter_dimension`). LAN guests of a world run that way
stay in the host's dimension. That mode is the escape hatch, so it gets no multi-level work.
## One code path for both