[PR #1868] [MERGED] Launcher: find Minecraft in a Modrinth App Fabric or Quilt profile #3830

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

📋 Pull Request Information

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

Base: main ← Head: fix/modrinth-loader-profiles


📝 Commits (1)

  • 65d3edf Launcher: find the client jar of a Modrinth App mod loader profile (#1783)

📊 Changes

2 files changed (+41 additions, -0 deletions)

View changed files

📝 launcher/src/sources.rs (+18 -0)
📝 launcher/src/sources_tests.rs (+23 -0)

📄 Description

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

What the player reported

#1783 (RZ, Windows 11): they downloaded and played 26.3 in the Modrinth App as a Fabric 26.3 profile, then chose ModrinthApp\profiles\Fabric 26.3 in the launcher. Prepare said "Minecraft 26.3 was not found". Prism Launcher worked for them.

Cause

The launcher looks for the Modrinth App's client jar only at meta/versions/26.3/26.3.jar, where a vanilla 26.3 profile has it. For a mod loader's profile, the Modrinth App stores the same vanilla client jar under the loader profile's name, meta/versions/26.3-<loader>/26.3-<loader>.jar. A player who only ever played the Fabric profile has no versions/26.3/ folder.

Fix

client_jars also lists every versions/<v>-*/<same name>.jar under a launcher folder (loader_jars). As with every other candidate, the jar must match the pinned client sha1, so a patched or wrong jar is never used. The loader profile's version JSON is the Modrinth App's own rewrite, so Mojang's pinned one is fetched into the linked layout, the same as for the vanilla profile.

I don't have the Modrinth App, so the folder name pattern is the one it is known to use. It isn't confirmed on the reporter's machine. If the name is different, nothing changes: the jar is matched by its sha1 anyway.

Tested

  • New test sources::tests::a_modrinth_loader_profile_has_the_client_jar: a Modrinth App folder with only meta/versions/26.3-0.18.1/ (and another version's profile beside it), chosen through profiles/Fabric 26.3, resolves and is linked like the vanilla profile.
  • Launcher CLI prepare on the Mac mini, fresh mktemp homes with the env isolation from CLAUDE.md. The fixture is a Modrinth App folder (meta/versions/26.3-0.18.1/26.3-0.18.1.jar = the pinned client jar, meta/libraries, meta/assets with index 34), --minecraft ".../ModrinthApp/profiles/Fabric 26.3":
    • main: Minecraft 26.3 was not found. Horizon looked in: …/ModrinthApp/profiles/Fabric 26.3 (no Minecraft 26.3 client jar), the error in the screenshot.
    • this branch: Using Minecraft 26.3 from the chosen folder (…/ModrinthApp/meta), Mojang's version file and the server jar downloaded, Sound assets ready: 4962 files, 377.3 MB, Imported client 26.3, and the exporters started (stopped there).

Fixes #1783

python3 tools/pr_ready.py --quick:

Check Result
Scope ✅ 2 files, +41 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (5 s)
launcher tests ✅ 127 passed (7 s)
Parity ➖ no harness affected
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/1868 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/modrinth-loader-profiles` --- ### 📝 Commits (1) - [`65d3edf`](https://github.com/horizon-rust/horizon/commit/65d3edfc3a1fc391f99dd091e41d031857a61583) Launcher: find the client jar of a Modrinth App mod loader profile (#1783) ### 📊 Changes **2 files changed** (+41 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/sources.rs` (+18 -0) 📝 `launcher/src/sources_tests.rs` (+23 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What the player reported #1783 (RZ, Windows 11): they downloaded and played 26.3 in the Modrinth App as a **Fabric 26.3** profile, then chose `ModrinthApp\profiles\Fabric 26.3` in the launcher. Prepare said "Minecraft 26.3 was not found". Prism Launcher worked for them. ## Cause The launcher looks for the Modrinth App's client jar only at `meta/versions/26.3/26.3.jar`, where a vanilla 26.3 profile has it. For a mod loader's profile, the Modrinth App stores the same vanilla client jar under the loader profile's name, `meta/versions/26.3-<loader>/26.3-<loader>.jar`. A player who only ever played the Fabric profile has no `versions/26.3/` folder. ## Fix `client_jars` also lists every `versions/<v>-*/<same name>.jar` under a launcher folder (`loader_jars`). As with every other candidate, the jar must match the pinned client sha1, so a patched or wrong jar is never used. The loader profile's version JSON is the Modrinth App's own rewrite, so Mojang's pinned one is fetched into the linked layout, the same as for the vanilla profile. I don't have the Modrinth App, so the folder name pattern is the one it is known to use. It isn't confirmed on the reporter's machine. If the name is different, nothing changes: the jar is matched by its sha1 anyway. ## Tested - New test `sources::tests::a_modrinth_loader_profile_has_the_client_jar`: a Modrinth App folder with only `meta/versions/26.3-0.18.1/` (and another version's profile beside it), chosen through `profiles/Fabric 26.3`, resolves and is linked like the vanilla profile. - Launcher CLI `prepare` on the Mac mini, fresh `mktemp` homes with the env isolation from CLAUDE.md. The fixture is a Modrinth App folder (`meta/versions/26.3-0.18.1/26.3-0.18.1.jar` = the pinned client jar, `meta/libraries`, `meta/assets` with index 34), `--minecraft ".../ModrinthApp/profiles/Fabric 26.3"`: - main: `Minecraft 26.3 was not found. Horizon looked in: …/ModrinthApp/profiles/Fabric 26.3 (no Minecraft 26.3 client jar)`, the error in the screenshot. - this branch: `Using Minecraft 26.3 from the chosen folder (…/ModrinthApp/meta)`, Mojang's version file and the server jar downloaded, `Sound assets ready: 4962 files, 377.3 MB`, `Imported client 26.3`, and the exporters started (stopped there). Fixes #1783 `python3 tools/pr_ready.py --quick`: | Check | Result | | --- | --- | | Scope | ✅ 2 files, +41 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (5 s) | | launcher tests | ✅ 127 passed (7 s) | | Parity | ➖ no harness affected | | 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 04:12:38 +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#3830
No description provided.