Integrated server: single-player pause menu labels

On its server thread a single-player world is joined like a server, so
the Horizon pause menu named it "Multiplayer" with a "Disconnect" button,
and F3+Escape opened the full menu as on a server. The server thread now
hands the window the world's name with its connection, the pause menu
shows that name and "Save and quit", and `has_singleplayer_server`
(Minecraft.hasSingleplayerServer) covers both ways of running a world for
the pause checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-16 23:45:19 +02:00
parent bd0dd979a0
commit 30d11d6a2e
4 changed files with 29 additions and 17 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ impl DebugHost for Host<'_, '_> {
// the menu as it always has (key_pressed).
let g = &mut *self.game;
if without_menu && g.screen == Screen::Playing {
g.pause_menu = !(g.remote.is_none() && g.lan.is_none());
g.pause_menu = !(g.has_singleplayer_server() && g.lan.is_none());
g.screen = Screen::Paused;
g.capture(false);
g.mining = None;