[PR #4848] [MERGED] Mods page: native mods installed but not built say so #5890

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

📋 Pull Request Information

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

Base: main ← Head: fix/mods-screen-native-hint


📝 Commits (1)

  • 5fe97cd Mods page: native mods installed but not built say so

📊 Changes

4 files changed (+115 additions, -1 deletions)

View changed files

📝 crates/horizon-client-render/src/mod_list.rs (+5 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+3 -1)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+1 -0)
📝 crates/horizon-client/src/game/mods.rs (+106 -0)

📄 Description

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

Part of #4770. In the reporter's screenshot, horizon-native-mods/ holds 13 .hnmod files, and the game's Options → Mods says "No mods: put .hmod files in the horizon-mods folder". Players then copied the .hnmod files into horizon-mods, which does nothing. A native mod runs only in a game the launcher built with it. Nothing in the game said so.

What changes

  • game/mods.rs start_mods: each .hnmod in horizon-native-mods/ (beside horizon-mods/, where the launcher installs them) that this game wasn't built with gets a row: "veinminer 0.3.0: ON/OFF (Not built)".
    • Its tooltip: "Installed, not built into this game: build the game with it in the launcher (Settings > Native mods), then play the instance that build is in."
    • "Built with" is read from the native-mods.json the launcher writes beside a native build's binary (mods[].id). A release or Nightly has none.
    • No row is added for a mod already listed (a native mod's own row from native_mods).
    • A file that isn't a valid bundle is skipped, the same check the launcher makes (horizon_mods::index::native::Bundle::read).
  • The row's toggle is the mod.<id> line in horizon-mods.txt. That's the line the launcher's next build follows (browser::java::is_enabled), so it means what it says.
  • mod_list::NATIVE_DIR, mod_list::NOT_BUILT, and the horizon.mods.not_built string (" (Not built)").

Checked

  • game::mods::tests::native_mods_installed_but_not_built_get_a_row_saying_so covers:
    • three bundles, a text file and a broken .hnmod on a release: three rows, sorted, NOT_BUILT;
    • a native build with one of them plus one already listed: only the third remains;
    • no folder: no rows.
  • Not run in a real game window here: this worktree has no prepared .local/.

Related: the build itself plays in a separate "Native mods" instance when started from Horizon's own instance (levzzz5154's #3870 builds in the same instance). After that lands, the tooltip's "the instance that build is in" is the one the mod was installed in.

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at 9510efd2f, 3 min 4 s)

Check Result
Scope ✅ 4 files, +115 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (1 min 10 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 4 s)
tests: horizon-client, horizon-client-render ✅ 1901 passed (36 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 126 affected, to run in CI (no vanilla data here): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, breaking_model and 114 more
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/4848 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/mods-screen-native-hint` --- ### 📝 Commits (1) - [`5fe97cd`](https://github.com/horizon-rust/horizon/commit/5fe97cd6d1f5fb43bf438ce5c7691365e507e382) Mods page: native mods installed but not built say so ### 📊 Changes **4 files changed** (+115 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/mod_list.rs` (+5 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+3 -1) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+1 -0) 📝 `crates/horizon-client/src/game/mods.rs` (+106 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of #4770. In the reporter's screenshot, `horizon-native-mods/` holds 13 `.hnmod` files, and the game's Options → Mods says **"No mods: put .hmod files in the horizon-mods folder"**. Players then copied the `.hnmod` files into `horizon-mods`, which does nothing. A native mod runs only in a game the launcher built with it. Nothing in the game said so. ## What changes - `game/mods.rs` `start_mods`: each `.hnmod` in `horizon-native-mods/` (beside `horizon-mods/`, where the launcher installs them) that this game wasn't built with gets a row: "veinminer 0.3.0: ON/OFF (Not built)". - Its tooltip: "Installed, not built into this game: build the game with it in the launcher (Settings > Native mods), then play the instance that build is in." - "Built with" is read from the `native-mods.json` the launcher writes beside a native build's binary (`mods[].id`). A release or Nightly has none. - No row is added for a mod already listed (a native mod's own row from `native_mods`). - A file that isn't a valid bundle is skipped, the same check the launcher makes (`horizon_mods::index::native::Bundle::read`). - The row's toggle is the `mod.<id>` line in `horizon-mods.txt`. That's the line the launcher's next build follows (`browser::java::is_enabled`), so it means what it says. - `mod_list::NATIVE_DIR`, `mod_list::NOT_BUILT`, and the `horizon.mods.not_built` string (" (Not built)"). ## Checked - `game::mods::tests::native_mods_installed_but_not_built_get_a_row_saying_so` covers: - three bundles, a text file and a broken `.hnmod` on a release: three rows, sorted, `NOT_BUILT`; - a native build with one of them plus one already listed: only the third remains; - no folder: no rows. - Not run in a real game window here: this worktree has no prepared `.local/`. Related: the build itself plays in a separate "Native mods" instance when started from Horizon's own instance (levzzz5154's #3870 builds in the same instance). After that lands, the tooltip's "the instance that build is in" is the one the mod was installed in. **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at 9510efd2f, 3 min 4 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +115 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (1 min 10 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 4 s) | | tests: horizon-client, horizon-client-render | ✅ 1901 passed (36 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 126 affected, to run in CI (no vanilla data here): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, breaking_model and 114 more | | 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:15:43 +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#5890
No description provided.