[PR #3688] [MERGED] Launcher: Java instances get a window size and join a server on launch #5150

Closed
opened 2026-11-03 05:10:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-java-instance-settings


📝 Commits (1)

  • d785041 Launcher: Java instances get a window size and join a server on launch

📊 Changes

7 files changed (+233 additions, -22 deletions)

View changed files

📝 docs/launcher-commands.md (+1 -0)
📝 launcher/src/backend.rs (+4 -0)
📝 launcher/src/cli.rs (+44 -9)
📝 launcher/src/instances.rs (+3 -0)
📝 launcher/src/java_launch.rs (+85 -11)
📝 launcher/src/java_launch/tests.rs (+95 -1)
📝 launcher/src/main.rs (+1 -1)

📄 Description

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

Two Prism Launcher features Java instances lacked, built from public documentation only:

  • Window size per Java instance: instance java <instance> --window 1280x720, and --window default goes back to the game's own 854×480. Modern versions get it through their has_custom_resolution rule (${resolution_width}, ${resolution_height}). Versions whose arguments have no such rule (before 1.13) get --width and --height directly; the game has taken those since 1.6.1.
  • Join a server on launch: play --instance <java instance> --server <address | server-list name>. From 1.20 (23w14a) this goes through the version's is_quick_play_multiplayer rule (--quickPlayMultiplayer). Before that, it uses --server <host> --port <port> (25565 by default; an IPv6 address in brackets keeps its colons). It works the same as --server already does for Horizon instances.
  • Rule features are now matched against what the launch turns on. They used to be always off. Library rules are unchanged.

Gap sources (Prism, public wiki): Minecraft settings: window size, Command line: --server, join on launch.
Format sources:

Tests:

  • a_window_size_and_a_server_to_join: a modern version through its rules, and a 1.12.2-shaped version through --width/--height/--server/--port. Both features stay off unless asked for.
  • server_addresses_split_into_host_and_port.
  • window_sizes (CLI parsing).

Checked in a scratch home: the window size is set, cleared and refused when malformed. Starting the game itself needs a signed-in owner, so I didn't run it here.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 87a6a7a16, 4 min 35 s)

Check Result
Scope ✅ 7 files, +233 −22
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 411 passed (4 min 17 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (4 s)
launcher clippy ✅ (6 s)
launcher tests ✅ 269 passed (7 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/3688 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-java-instance-settings` --- ### 📝 Commits (1) - [`d785041`](https://github.com/horizon-rust/horizon/commit/d785041833924a1097ed0a0d1c5d207fe7102e30) Launcher: Java instances get a window size and join a server on launch ### 📊 Changes **7 files changed** (+233 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+1 -0) 📝 `launcher/src/backend.rs` (+4 -0) 📝 `launcher/src/cli.rs` (+44 -9) 📝 `launcher/src/instances.rs` (+3 -0) 📝 `launcher/src/java_launch.rs` (+85 -11) 📝 `launcher/src/java_launch/tests.rs` (+95 -1) 📝 `launcher/src/main.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Two Prism Launcher features Java instances lacked, built from public documentation only: - **Window size per Java instance:** `instance java <instance> --window 1280x720`, and `--window default` goes back to the game's own 854×480. Modern versions get it through their `has_custom_resolution` rule (`${resolution_width}`, `${resolution_height}`). Versions whose arguments have no such rule (before 1.13) get `--width` and `--height` directly; the game has taken those since 1.6.1. - **Join a server on launch:** `play --instance <java instance> --server <address | server-list name>`. From 1.20 (23w14a) this goes through the version's `is_quick_play_multiplayer` rule (`--quickPlayMultiplayer`). Before that, it uses `--server <host> --port <port>` (25565 by default; an IPv6 address in brackets keeps its colons). It works the same as `--server` already does for Horizon instances. - Rule features are now matched against what the launch turns on. They used to be always off. Library rules are unchanged. Gap sources (Prism, public wiki): [Minecraft settings: window size](https://prismlauncher.org/wiki/help-pages/minecraft-settings/), [Command line: `--server`, join on launch](https://prismlauncher.org/wiki/getting-started/command-line-interface/). Format sources: - [minecraft.wiki: Client.json](https://minecraft.wiki/w/Client.json) (argument rule features) - [minecraft.wiki: client command line arguments](https://minecraft.wiki/w/Java_Edition_client_command_line_arguments) (`--width`/`--height` since 1.6.1; `--server`/`--port` until 23w14a) - [minecraft.wiki: Quick Play](https://minecraft.wiki/w/Quick_Play) - The placeholder names were checked against Mojang's 1.21.1 version file, read and not committed. Tests: - `a_window_size_and_a_server_to_join`: a modern version through its rules, and a 1.12.2-shaped version through `--width/--height/--server/--port`. Both features stay off unless asked for. - `server_addresses_split_into_host_and_port`. - `window_sizes` (CLI parsing). Checked in a scratch home: the window size is set, cleared and refused when malformed. Starting the game itself needs a signed-in owner, so I didn't run it here. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 87a6a7a16, 4 min 35 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +233 −22 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 411 passed (4 min 17 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (4 s) | | launcher clippy | ✅ (6 s) | | launcher tests | ✅ 269 passed (7 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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 05:10:36 +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#5150
No description provided.