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
+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