[PR #3603] [MERGED] Launcher: Modrinth mods and resource packs for Java instances #5088

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-java-modrinth


📝 Commits (2)

  • 1231679 Launcher: Modrinth mods and resource packs for Java instances
  • e6412d6 Launcher: the CLI test expects mods search to take --instance

📊 Changes

8 files changed (+565 additions, -25 deletions)

View changed files

📝 docs/launcher-commands.md (+3 -2)
📝 launcher/src/browser.rs (+1 -0)
📝 launcher/src/browser/installed.rs (+19 -1)
➕ launcher/src/browser/java_instance.rs (+177 -0)
➕ launcher/src/browser/java_instance/tests.rs (+276 -0)
📝 launcher/src/browser/modrinth.rs (+2 -0)
📝 launcher/src/cli.rs (+77 -22)
📝 launcher/src/instances.rs (+10 -0)

📄 Description

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

Java Edition instances can now get mods and resource packs from Modrinth: the source's own files, made for the instance's Minecraft version and loader, go as they are into its mods/ and resourcepacks/ (nothing is ported).

  • browser/java_instance.rs: a Target (Minecraft version, loader). It builds the search (versions:<mc>, categories:<loader>), picks the newest version for that version and loader (a Quilt instance takes Fabric files after its own: Quilt FAQ), plans required dependencies recursively (checked before any download), installs, updates and removes. The instance's mod-browser.json lists what it installed.
  • installed::put: the existing download-and-record loop, shared by both paths.
  • Modrinth search: the Quilt loader filter also lists Fabric mods.
  • CLI: mods search|install|update|remove|list --instance <java instance> use it (default: the selected instance). enable/disable say that a Java instance loads every jar in mods/.
  • A vanilla instance takes resource packs; mods are refused until it has a loader (Fabric/Quilt is the next PR, which fills JavaGame::target's loader).

Checked live in a scratch home: a 1.21.1 instance, mods search faithful lists 1.21.1 packs, then mods install faithful-32x, list, update --check and remove work. mods install sodium is refused because the instance has no loader.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 92c462a9b, 1 min 24 s)

Check Result
Scope ⚠️ 8 files, +555 −15; 565 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 408 passed (1 min 18 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 ✅ (1 s)
launcher clippy ✅
launcher tests ✅ 255 passed (4 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/3603 **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-modrinth` --- ### 📝 Commits (2) - [`1231679`](https://github.com/horizon-rust/horizon/commit/1231679c4dcb6bcbeb948289bcd56ccd53289a98) Launcher: Modrinth mods and resource packs for Java instances - [`e6412d6`](https://github.com/horizon-rust/horizon/commit/e6412d6e5c2a660501d2470a915d796405c0a335) Launcher: the CLI test expects mods search to take --instance ### 📊 Changes **8 files changed** (+565 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+3 -2) 📝 `launcher/src/browser.rs` (+1 -0) 📝 `launcher/src/browser/installed.rs` (+19 -1) ➕ `launcher/src/browser/java_instance.rs` (+177 -0) ➕ `launcher/src/browser/java_instance/tests.rs` (+276 -0) 📝 `launcher/src/browser/modrinth.rs` (+2 -0) 📝 `launcher/src/cli.rs` (+77 -22) 📝 `launcher/src/instances.rs` (+10 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Java Edition instances can now get mods and resource packs from Modrinth: the source's own files, made for the instance's Minecraft version and loader, go as they are into its `mods/` and `resourcepacks/` (nothing is ported). - `browser/java_instance.rs`: a `Target` (Minecraft version, loader). It builds the search (`versions:<mc>`, `categories:<loader>`), picks the newest version for that version and loader (a Quilt instance takes Fabric files after its own: [Quilt FAQ](https://quiltmc.org/en/about/faq/)), plans required dependencies recursively (checked before any download), installs, updates and removes. The instance's `mod-browser.json` lists what it installed. - `installed::put`: the existing download-and-record loop, shared by both paths. - Modrinth search: the Quilt loader filter also lists Fabric mods. - CLI: `mods search|install|update|remove|list --instance <java instance>` use it (default: the selected instance). `enable`/`disable` say that a Java instance loads every jar in `mods/`. - A vanilla instance takes resource packs; mods are refused until it has a loader (Fabric/Quilt is the next PR, which fills `JavaGame::target`'s loader). Checked live in a scratch home: a 1.21.1 instance, `mods search faithful` lists 1.21.1 packs, then `mods install faithful-32x`, `list`, `update --check` and `remove` work. `mods install sodium` is refused because the instance has no loader. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 92c462a9b, 1 min 24 s) | Check | Result | | --- | --- | | Scope | ⚠️ 8 files, +555 −15; 565 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 408 passed (1 min 18 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 | ✅ (1 s) | | launcher clippy | ✅ | | launcher tests | ✅ 255 passed (4 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:09 +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#5088
No description provided.