[PR #2596] [MERGED] Launcher: play straight into a world or server, and the Multiplayer list #4458

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-quick-play


📝 Commits (1)

  • 4b761ab Launcher: play straight into a world or server, and the Multiplayer list

📊 Changes

14 files changed (+744 additions, -2 deletions)

View changed files

📝 docs/launcher-commands.md (+34 -0)
📝 launcher/Cargo.lock (+1 -0)
📝 launcher/Cargo.toml (+1 -0)
📝 launcher/README.md (+9 -0)
📝 launcher/src/cli.rs (+93 -0)
📝 launcher/src/cli_tools.rs (+1 -0)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+23 -0)
📝 launcher/src/mcp.rs (+7 -0)
➕ launcher/src/multiplayer_page.rs (+251 -0)
➕ launcher/src/server_list.rs (+159 -0)
➕ launcher/src/server_list/tests.rs (+143 -0)
📝 launcher/src/servers_page.rs (+7 -1)
📝 launcher/src/worlds_page.rs (+14 -1)

📄 Description

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

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Item 4 of the launcher features. Stacked on #2593 (worlds), which is stacked on #2591, #2590 and #2587.

What

  • Play on each world (Home → Worlds): the game starts straight into that world.
  • Multiplayer on Home: the selected instance's servers, read from the game's own servers.dat, each with the picture the game last saw (the base64 PNG in the file). Join starts the game straight into the server; Add server (name, address) and Remove (after a confirmation) change the same file the game's Multiplayer screen reads.
  • server_list.rs reads and writes servers.dat as vanilla does (ServerList.load/save, ServerData.read/write): uncompressed NBT, servers a list of compounds; saved to a new file first, the old one kept as servers.dat_old. Every entry is written back with all its fields (icon, acceptTextures, acceptedCodeOfConduct...), and the hidden entries (servers joined with Direct Connection) stay; a new server goes after the shown ones, where the game puts it. A file that can't be read is an empty list, as in the game.
  • The launcher passes --world <folder> / --server <address>, which every Horizon release takes. The game also learns vanilla's names for them, --quickPlaySingleplayer and --quickPlayMultiplayer, in #2595.
  • CLI: horizon-launcher multiplayer [list|add|remove] [--instance <name>], play --server <address, or a listed server's name or position>. MCP: play takes server; multiplayer_list/add/remove are generated from the CLI, and multiplayer remove needs confirm: true. docs/launcher-commands.md regenerated.

Size: 744 lines, of which 143 are tests and 34 the regenerated command reference.

Screenshots (scratch homes, a generated servers.dat with two pictures and one hidden entry)

Worlds with Play, and the Multiplayer list:
home

Add server; an empty address is refused:
add
error

Remove asks first, then the list is shorter (the hidden Direct Connection entry and both pictures stayed in the file):
confirm
removed

Clicking Join on "Friends" and Play on "Old seed test" started the (stand-in) game with:

cwd=.../instances/hardcore args=--resources .../26.3 --server friends.example:25570
cwd=.../instances/hardcore args=--resources .../26.3 --world Old

Typing into the fields can't be shown: synthetic key events reach no window in this session. Adding through the CLI (same List::add) and the unit tests cover it.

Proof

  • cargo fmt --check, cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings: clean.
  • cargo test --locked --lib: 148 passed (3 new: vanilla-shaped file read with its picture; add/remove keeps every other field byte-equal and the hidden entry, writes servers.dat_old; default name). --bin horizon-launcher: 35 passed.
  • CLI by hand: multiplayer add/list/remove, --json multiplayer list, play --server Friends → --server friends.example:25570, play --server 10.0.0.9:25565 passes the address through.

🤖 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/2596 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-quick-play` --- ### 📝 Commits (1) - [`4b761ab`](https://github.com/horizon-rust/horizon/commit/4b761abcb2d96e84e9362d290f805a0508cec51b) Launcher: play straight into a world or server, and the Multiplayer list ### 📊 Changes **14 files changed** (+744 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+34 -0) 📝 `launcher/Cargo.lock` (+1 -0) 📝 `launcher/Cargo.toml` (+1 -0) 📝 `launcher/README.md` (+9 -0) 📝 `launcher/src/cli.rs` (+93 -0) 📝 `launcher/src/cli_tools.rs` (+1 -0) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+23 -0) 📝 `launcher/src/mcp.rs` (+7 -0) ➕ `launcher/src/multiplayer_page.rs` (+251 -0) ➕ `launcher/src/server_list.rs` (+159 -0) ➕ `launcher/src/server_list/tests.rs` (+143 -0) 📝 `launcher/src/servers_page.rs` (+7 -1) 📝 `launcher/src/worlds_page.rs` (+14 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Item 4 of the launcher features. Stacked on #2593 (worlds), which is stacked on #2591, #2590 and #2587. ## What - **Play on each world** (Home → Worlds): the game starts straight into that world. - **Multiplayer** on Home: the selected instance's servers, read from the game's own `servers.dat`, each with the picture the game last saw (the base64 PNG in the file). **Join** starts the game straight into the server; **Add server** (name, address) and **Remove** (after a confirmation) change the same file the game's Multiplayer screen reads. - `server_list.rs` reads and writes `servers.dat` as vanilla does (`ServerList.load/save`, `ServerData.read/write`): uncompressed NBT, `servers` a list of compounds; saved to a new file first, the old one kept as `servers.dat_old`. Every entry is written back with all its fields (`icon`, `acceptTextures`, `acceptedCodeOfConduct`...), and the hidden entries (servers joined with Direct Connection) stay; a new server goes after the shown ones, where the game puts it. A file that can't be read is an empty list, as in the game. - The launcher passes `--world <folder>` / `--server <address>`, which every Horizon release takes. The game also learns vanilla's names for them, `--quickPlaySingleplayer` and `--quickPlayMultiplayer`, in #2595. - CLI: `horizon-launcher multiplayer [list|add|remove] [--instance <name>]`, `play --server <address, or a listed server's name or position>`. MCP: `play` takes `server`; `multiplayer_list/add/remove` are generated from the CLI, and `multiplayer remove` needs `confirm: true`. `docs/launcher-commands.md` regenerated. Size: 744 lines, of which 143 are tests and 34 the regenerated command reference. ## Screenshots (scratch homes, a generated servers.dat with two pictures and one hidden entry) Worlds with Play, and the Multiplayer list: ![home](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-04-quick-play/mp2.png) Add server; an empty address is refused: ![add](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-04-quick-play/mp_add.png) ![error](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-04-quick-play/mp_err.png) Remove asks first, then the list is shorter (the hidden Direct Connection entry and both pictures stayed in the file): ![confirm](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-04-quick-play/mp_confirm.png) ![removed](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-04-quick-play/mp_removed.png) Clicking Join on "Friends" and Play on "Old seed test" started the (stand-in) game with: ``` cwd=.../instances/hardcore args=--resources .../26.3 --server friends.example:25570 cwd=.../instances/hardcore args=--resources .../26.3 --world Old ``` Typing into the fields can't be shown: synthetic key events reach no window in this session. Adding through the CLI (same `List::add`) and the unit tests cover it. ## Proof - `cargo fmt --check`, `cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings`: clean. - `cargo test --locked --lib`: 148 passed (3 new: vanilla-shaped file read with its picture; add/remove keeps every other field byte-equal and the hidden entry, writes `servers.dat_old`; default name). `--bin horizon-launcher`: 35 passed. - CLI by hand: `multiplayer add/list/remove`, `--json multiplayer list`, `play --server Friends` → `--server friends.example:25570`, `play --server 10.0.0.9:25565` passes the address through. 🤖 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:17:17 +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#4458
No description provided.