[PR #1246] [MERGED] Modpacks from the mod browser: ported in the same step, mods loaded together #3451

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

📋 Pull Request Information

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

Base: main ← Head: feat/modbrowser-modpacks-port


📝 Commits (10+)

  • da996b9 port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes
  • 4a350bb port-pack carry: leave out recipes for items it didn't declare
  • 3530560 Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods
  • a3f81f3 Launcher: test a Java mod's install, dependencies, id clash and removal offline
  • b8f7924 Mod browser: CurseForge is coming soon
  • f539986 Launcher mod browser: project pages, search filters, project icons and gallery
  • f926d1d Modpacks from the mod browser: ported in the same step, mods loaded together
  • da99104 Modpacks: jars only CurseForge serves are left off, "CurseForge downloads coming soon"
  • 9ae041c Merge origin/main into feat/modbrowser-java-verdicts
  • a5d68dc Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher

📊 Changes

28 files changed (+3774 additions, -202 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+101 -0)
➕ crates/horizon-port-pack/src/check.rs (+411 -0)
➕ crates/horizon-port-pack/src/classes.rs (+642 -0)
📝 crates/horizon-port-pack/src/fetch.rs (+3 -3)
📝 crates/horizon-port-pack/src/lib.rs (+2 -0)
📝 crates/horizon-port-pack/src/main.rs (+16 -1)
📝 crates/horizon-port-pack/src/pipeline.rs (+113 -1)
📝 docs/mod-browser.md (+95 -30)
📝 docs/modpacks.md (+49 -4)
📝 launcher/Cargo.toml (+1 -1)
📝 launcher/README.md (+5 -5)
📝 launcher/src/browser.rs (+81 -18)
📝 launcher/src/browser/curseforge.rs (+6 -2)
➕ launcher/src/browser/details.rs (+368 -0)
➕ launcher/src/browser/images.rs (+265 -0)
📝 launcher/src/browser/installed.rs (+33 -10)
📝 launcher/src/browser/installed/tests.rs (+83 -1)
➕ launcher/src/browser/java.rs (+340 -0)
📝 launcher/src/browser/modrinth.rs (+49 -14)
📝 launcher/src/browser/tests.rs (+58 -4)

...and 8 more files

📄 Description

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

Step 2 of brief modbrowser-java-1: a modpack imported from the mod browser gives a world that loads, with its ported mods on together, clashes resolved, and what didn't port listed. Stacked on #1243 (it touches mods_page.rs after it); this diff is against its branch.

What

  • One step. Importing a modpack from the Mods page (and horizon-launcher mods install <modpack>) now also ports it, for the selected version when it is prepared (modpacks::import_and_port). The message says how many of its files play. Play works straight after. A port that fails leaves the pack imported with the error, and Port stays there to retry.
  • Namespace clashes inside a pack (horizon-port-pack): a namespace two carried mods both claim is left to none of them, and its files stay outside. YUNG's structure mods all ship files under yungsapi (YUNG's API's namespace, whose own jar isn't carried), so the game dropped three of the four ("both use the namespace yungsapi; turn one of them off"). Now all of them load.
  • The game's rule, applied before start (pipeline::loadable, used by the launcher's profile): of two ported mods owning one namespace, the first stays on, as the game does. The others aren't passed to the game, and the pack lists them ("Left off: ..."). The coverage list already says why each mod that didn't port didn't.
  • CurseForge-only jars (CurseForge is coming soon) are listed with the mods left off, as ": CurseForge downloads coming soon". The port's log and fetch label say the same, and docs/modpacks.md no longer asks for a key.
  • Docs: docs/mod-browser.md, docs/modpacks.md (the namespace rule and a new "Three packs through the mod browser, measured"), website/docs/modpacks.md.

Measured (Mac mini M4 Pro, offscreen; other sessions kept the CPU at 85 to 93 %, so times are upper bounds)

Pack Files Import Port Ported mods Coverage Declared World load (resources) Crashes
Vanilla Perfected 26.3 (Fabric, small) 108 30.4 s 1.0 s 2 2 partial, 79 not yet, 27 not needed no blocks 5.2 s (2.1 s) none
Slimes Adventure 1.13.4 (Fabric 1.21.1, medium) 105 18.8 s 22.8 s 20 20 partial, 46 not yet, 39 not needed 8,208 blocks, 41 items, 1,376 recipes 23.0 s (15.0 s) none
All the Mods 10 8.3 (NeoForge 1.21.1, CurseForge zip) 496 3.1 s 29.4 s 42 42 partial, 333 not yet, 121 not needed 10,000 blocks, 1,273 items, 4,178 recipes 38.3 s (28.7 s) none
  • The same world with no mods loads in 5.4 s (resources 1.1 s).
  • The two Modrinth packs went through the browser's import (mods install). ATM10 came from its zip (modpack import), because CurseForge support is coming soon. Its 42 jars were copied from a folder; 12 more are CurseForge-only, and the pack now lists them as left off: "CurseForge downloads coming soon".
  • Every world loaded and stayed up, with no panic and no error line in the log.
  • Before the namespace fix, Slimes Adventure loaded 17 of its 20 ported mods; after it, 20.
  • The one-step CLI run for Slimes Adventure (debug launcher, pack and 20 jars downloaded, carried) took 70 s.
  • Share of the mods that need porting (not counting performance mods and libraries): 2 of 81, 20 of 66, and 42 of 375 ported, all partly.
  • Load time grows with declared blocks. ATM10 adds about 155,000 block states, and their models and textures are most of its 28.7 s. The content root's build is #1191's (perf/mod-content-build) area, so I left it alone.

Self-check

  • cargo fmt, cargo clippy -p horizon-port-pack --all-targets -- -D warnings, launcher cargo clippy --features gpui/runtime_shaders --all-targets: clean
  • cargo test -p horizon-port-pack: 65 passed (new: a namespace two mods claim is neither's; the first of two mods owning a namespace loads)
  • launcher cargo test --features gpui/runtime_shaders: all pass (the profile test now has real manifests and a clashing mod left off; new: CurseForge-only jars listed as coming soon)
  • tools/parity.py --changed: no game crate touched

Overlap

modpacks_page.rs (+3 lines, the "Left off" notes) and mods_page.rs (the modpack branch of mods_install) are also in design-gaming-1's area. My edits there are only logic and text, with no styling.

Needs Ludovic

Nothing.

🤖 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/1246 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/modbrowser-modpacks-port` --- ### 📝 Commits (10+) - [`da996b9`](https://github.com/horizon-rust/horizon/commit/da996b9fd13e02ab3e758393b6d428d4ef6f07d0) port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes - [`4a350bb`](https://github.com/horizon-rust/horizon/commit/4a350bb0a03c64b34245ddd5e3f526de305988f2) port-pack carry: leave out recipes for items it didn't declare - [`3530560`](https://github.com/horizon-rust/horizon/commit/35305605819cece46b2c53bdc94cc9de5151bd80) Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods - [`a3f81f3`](https://github.com/horizon-rust/horizon/commit/a3f81f3a30ec54d2cb84e806334db2db8a14684b) Launcher: test a Java mod's install, dependencies, id clash and removal offline - [`b8f7924`](https://github.com/horizon-rust/horizon/commit/b8f79247b865c2a4bba9d5e65803e280f581ceca) Mod browser: CurseForge is coming soon - [`f539986`](https://github.com/horizon-rust/horizon/commit/f53998674de95895558b99e00f572175293db3e0) Launcher mod browser: project pages, search filters, project icons and gallery - [`f926d1d`](https://github.com/horizon-rust/horizon/commit/f926d1d2b13fafc6d82c8abc7e893b650e631a03) Modpacks from the mod browser: ported in the same step, mods loaded together - [`da99104`](https://github.com/horizon-rust/horizon/commit/da991045f9e30c210cf8168b213849b76d18b3a9) Modpacks: jars only CurseForge serves are left off, "CurseForge downloads coming soon" - [`9ae041c`](https://github.com/horizon-rust/horizon/commit/9ae041ccd3a2e674616503eae5008a5125d61496) Merge origin/main into feat/modbrowser-java-verdicts - [`a5d68dc`](https://github.com/horizon-rust/horizon/commit/a5d68dc8900d0d01806e606e1eb9bd9d69875e06) Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher ### 📊 Changes **28 files changed** (+3774 additions, -202 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+101 -0) ➕ `crates/horizon-port-pack/src/check.rs` (+411 -0) ➕ `crates/horizon-port-pack/src/classes.rs` (+642 -0) 📝 `crates/horizon-port-pack/src/fetch.rs` (+3 -3) 📝 `crates/horizon-port-pack/src/lib.rs` (+2 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+16 -1) 📝 `crates/horizon-port-pack/src/pipeline.rs` (+113 -1) 📝 `docs/mod-browser.md` (+95 -30) 📝 `docs/modpacks.md` (+49 -4) 📝 `launcher/Cargo.toml` (+1 -1) 📝 `launcher/README.md` (+5 -5) 📝 `launcher/src/browser.rs` (+81 -18) 📝 `launcher/src/browser/curseforge.rs` (+6 -2) ➕ `launcher/src/browser/details.rs` (+368 -0) ➕ `launcher/src/browser/images.rs` (+265 -0) 📝 `launcher/src/browser/installed.rs` (+33 -10) 📝 `launcher/src/browser/installed/tests.rs` (+83 -1) ➕ `launcher/src/browser/java.rs` (+340 -0) 📝 `launcher/src/browser/modrinth.rs` (+49 -14) 📝 `launcher/src/browser/tests.rs` (+58 -4) _...and 8 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Step 2 of brief modbrowser-java-1: a modpack imported from the mod browser gives a world that loads, with its ported mods on together, clashes resolved, and what didn't port listed. Stacked on #1243 (it touches `mods_page.rs` after it); this diff is against its branch. ## What - **One step.** Importing a modpack from the Mods page (and `horizon-launcher mods install <modpack>`) now also ports it, for the selected version when it is prepared (`modpacks::import_and_port`). The message says how many of its files play. **Play** works straight after. A port that fails leaves the pack imported with the error, and **Port** stays there to retry. - **Namespace clashes inside a pack** (`horizon-port-pack`): a namespace two carried mods both claim is left to none of them, and its files stay outside. YUNG's structure mods all ship files under `yungsapi` (YUNG's API's namespace, whose own jar isn't carried), so the game dropped three of the four ("both use the namespace yungsapi; turn one of them off"). Now all of them load. - **The game's rule, applied before start** (`pipeline::loadable`, used by the launcher's profile): of two ported mods owning one namespace, the first stays on, as the game does. The others aren't passed to the game, and the pack lists them ("Left off: ..."). The coverage list already says why each mod that didn't port didn't. - **CurseForge-only jars** (CurseForge is coming soon) are listed with the mods left off, as "<mod>: CurseForge downloads coming soon". The port's log and `fetch` label say the same, and `docs/modpacks.md` no longer asks for a key. - Docs: `docs/mod-browser.md`, `docs/modpacks.md` (the namespace rule and a new "Three packs through the mod browser, measured"), `website/docs/modpacks.md`. ## Measured (Mac mini M4 Pro, offscreen; other sessions kept the CPU at 85 to 93 %, so times are upper bounds) | Pack | Files | Import | Port | Ported mods | Coverage | Declared | World load (resources) | Crashes | |---|---|---|---|---|---|---|---|---| | Vanilla Perfected 26.3 (Fabric, small) | 108 | 30.4 s | 1.0 s | 2 | 2 partial, 79 not yet, 27 not needed | no blocks | 5.2 s (2.1 s) | none | | Slimes Adventure 1.13.4 (Fabric 1.21.1, medium) | 105 | 18.8 s | 22.8 s | 20 | 20 partial, 46 not yet, 39 not needed | 8,208 blocks, 41 items, 1,376 recipes | 23.0 s (15.0 s) | none | | All the Mods 10 8.3 (NeoForge 1.21.1, CurseForge zip) | 496 | 3.1 s | 29.4 s | 42 | 42 partial, 333 not yet, 121 not needed | 10,000 blocks, 1,273 items, 4,178 recipes | 38.3 s (28.7 s) | none | - The same world with no mods loads in 5.4 s (resources 1.1 s). - The two Modrinth packs went through the browser's import (`mods install`). ATM10 came from its zip (`modpack import`), because CurseForge support is coming soon. Its 42 jars were copied from a folder; 12 more are CurseForge-only, and the pack now lists them as left off: "CurseForge downloads coming soon". - Every world loaded and stayed up, with no panic and no error line in the log. - Before the namespace fix, Slimes Adventure loaded 17 of its 20 ported mods; after it, 20. - The one-step CLI run for Slimes Adventure (debug launcher, pack and 20 jars downloaded, carried) took 70 s. - Share of the mods that need porting (not counting performance mods and libraries): 2 of 81, 20 of 66, and 42 of 375 ported, all partly. - Load time grows with declared blocks. ATM10 adds about 155,000 block states, and their models and textures are most of its 28.7 s. The content root's build is #1191's (perf/mod-content-build) area, so I left it alone. ## Self-check - `cargo fmt`, `cargo clippy -p horizon-port-pack --all-targets -- -D warnings`, launcher `cargo clippy --features gpui/runtime_shaders --all-targets`: clean - `cargo test -p horizon-port-pack`: 65 passed (new: a namespace two mods claim is neither's; the first of two mods owning a namespace loads) - launcher `cargo test --features gpui/runtime_shaders`: all pass (the profile test now has real manifests and a clashing mod left off; new: CurseForge-only jars listed as coming soon) - `tools/parity.py --changed`: no game crate touched ## Overlap `modpacks_page.rs` (+3 lines, the "Left off" notes) and `mods_page.rs` (the modpack branch of `mods_install`) are also in design-gaming-1's area. My edits there are only logic and text, with no styling. ## Needs Ludovic Nothing. 🤖 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:09: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#3451
No description provided.