[PR #681] [MERGED] Carry: leave out the files the content loader would refuse #2726

Closed
opened 2026-11-02 15:58:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/carry-unreadable


📝 Commits (3)

  • ee10460 horizon-port-pack: a library, fetch and port; CurseForge zips name their mods
  • 1f1d5a5 Carry: leave out the files the content loader would refuse
  • 22bb18d Carry: the oracle's facts only for the mods it loaded

📊 Changes

10 files changed (+876 additions, -202 deletions)

View changed files

📝 crates/horizon-port-pack/Cargo.toml (+2 -3)
📝 crates/horizon-port-pack/src/carry.rs (+67 -2)
➕ crates/horizon-port-pack/src/fetch.rs (+389 -0)
📝 crates/horizon-port-pack/src/import.rs (+57 -2)
➕ crates/horizon-port-pack/src/lib.rs (+17 -0)
📝 crates/horizon-port-pack/src/main.rs (+70 -187)
📝 crates/horizon-port-pack/src/modrinth.rs (+3 -3)
➕ crates/horizon-port-pack/src/pipeline.rs (+246 -0)
📝 crates/horizon-port-pack/src/report.rs (+1 -1)
📝 docs/modpacks.md (+24 -4)

📄 Description

Stacked on #653 (base feat/port-pack-fetch). Merge #653 first.

Vanilla skips a resource with an invalid path, or a data file that doesn't parse, one file at a time. Horizon's content loader refuses the whole mod set instead, so a single bad file in one mod drops every content mod. carry now leaves those files out of carry/, keeps them in outside/, and lists them with the reason in the report's new unreadable map:

  • paths vanilla doesn't read (upper case), checked with horizon_mods::content::check_path, the game's own rule;
  • JSON that doesn't parse;
  • shared tags (minecraft, c) with "replace": true: a content mod may only add to them.

A byte-order mark is dropped and the file kept.

ATM10's 42 carried mods: 19 files in 7 mods:

  • Mekanism Tools' ry_UA.json;
  • CTOV's empty tag;
  • Towns and Towers' seven replacing village and outpost tags;
  • broken template pools in YUNG's fortresses and jungle temples;
  • three Pam's recipes with trailing data;
  • a Macaw's Trapdoors lang file.

With #674 on top, the 42 now load as carried (193,762 block states, in a world). Before this I had to set those files aside by hand.

horizon-mods (no default features, so no wasmtime) moves from a dev-dependency to a dependency. The launcher's lock picks it up through #663.

Second commit: the oracle's facts only for the mods it loaded. With oracle/facts.json present, a mod the oracle didn't load lost every block, because none of its ids were in the facts. That happens when a library it needs is missing. It now keeps the guesses from its blockstates, as it would without an oracle. For ATM10, Regions Unexplored (TerraBlender is CurseForge-only) gets its 805 blocks back.

Per-mod harness, ATM10's data-tier mods (local, 2026-10-17)

  • Oracle run: NeoForge 21.1.259, 101.7 s. It took 40 of the 42 downloaded jars plus 11 libraries fetched from Modrinth (Architectury, Athena, Cristel Lib, Formations, Fusion, Lithostitched, Mekanism, Moogs Structure Lib, Resourceful Lib, SuperMartijn642 Core Lib, YUNG's API).
  • Left out of the oracle: Moog's Structures (needs OmegaConfig) and Regions Unexplored (needs TerraBlender). Both libraries are CurseForge-only.
  • Exported: 9,633 mod blocks, 10,597 items, 3,988 recipes. Then carry, then tools/mod_port_harness.py.
mod result blocks shapes drops placement tags recipes items
Connected Glass pass 119/119 1700/1700 11900/11900 238/238 68/68 301/301 119/119
Macaw's Trapdoors pass 179/179 11456/11456 10024/10024 358/358 534/534 191/191 191/191
Luminax fail 192/192 13984/13984 12096/12096 320/384 288/288 192/192 192/192
Chipped fail 6857/6981 46396/46443 1449/149093 13548/13714 11984/12378 6/13 6849/6973
Glassential fail 105/114 4727/5177 6447/6447 210/210 105/105 143/143 106/115
Macaw's Doors fail 239/245 12352/15296 13384/13384 478/478 941/941 256/257 251/257
Macaw's Fences fail 150/180 4032/4800 33600/33600 300/300 432/432 222/222 150/180
Macaw's Paths fail 234/315 4472/4602 6734/6734 468/468 416/416 315/315 234/315
Macaw's Holidays fail 57/334 622/622 2394/2394 114/114 61/66 325/327 57/335
Macaw's Stairs fail 28/224 0/28 196/196 56/56 28/28 224/224 28/224
Macaw's Roofs fail 10/605 35/35 245/245 20/20 10/10 607/607 12/607
Macaw's Bridges fail 0/145 – – – – 252/254 1/146
Mekanism Tools fail – – – – – 4/87 72/72
Pam's Food Extended fail – – – – – 21/855 6/871

The other 28 are structure, worldgen and biome mods with no blocks, items or recipes of their own. The harness compares nothing for them yet (it doesn't compare worldgen), so they count as partial. Most of the failures are blocks whose vanilla class has no vanilla block with the same properties: roofs, bridges and stairs of their own shape, which API 0.2 can't express. Chipped's drops fail the other way round: in the oracle its blocks drop themselves, and in Horizon they drop nothing. Its jar ships no loot table for most of them (7 of about 7,000; the mod adds the rest at runtime), so the carry should write the self-drop table the oracle shows. The coverage report built from these results: 2 ported, 40 partial, 23 not yet of ATM10's 65 data-tier mods (12 of the 23 wait on CurseForge jars).

Checks: cargo fmt; cargo clippy -p horizon-port-pack --all-targets -D warnings; cargo test -p horizon-port-pack (21 pass; the carry test covers the four unreadable cases). Local parity: no harness depends on horizon-port-pack.

🤖 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/681 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/carry-unreadable` --- ### 📝 Commits (3) - [`ee10460`](https://github.com/horizon-rust/horizon/commit/ee104603dde8ebbe5c86efa939de4259f958fd16) horizon-port-pack: a library, fetch and port; CurseForge zips name their mods - [`1f1d5a5`](https://github.com/horizon-rust/horizon/commit/1f1d5a5aa413e9d4c0f0171b934cd2d96b7f64ee) Carry: leave out the files the content loader would refuse - [`22bb18d`](https://github.com/horizon-rust/horizon/commit/22bb18d67a62600ddbea898b935387e83a393391) Carry: the oracle's facts only for the mods it loaded ### 📊 Changes **10 files changed** (+876 additions, -202 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/Cargo.toml` (+2 -3) 📝 `crates/horizon-port-pack/src/carry.rs` (+67 -2) ➕ `crates/horizon-port-pack/src/fetch.rs` (+389 -0) 📝 `crates/horizon-port-pack/src/import.rs` (+57 -2) ➕ `crates/horizon-port-pack/src/lib.rs` (+17 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+70 -187) 📝 `crates/horizon-port-pack/src/modrinth.rs` (+3 -3) ➕ `crates/horizon-port-pack/src/pipeline.rs` (+246 -0) 📝 `crates/horizon-port-pack/src/report.rs` (+1 -1) 📝 `docs/modpacks.md` (+24 -4) </details> ### 📄 Description Stacked on #653 (base `feat/port-pack-fetch`). Merge #653 first. Vanilla skips a resource with an invalid path, or a data file that doesn't parse, one file at a time. Horizon's content loader refuses the whole mod set instead, so a single bad file in one mod drops every content mod. `carry` now leaves those files out of `carry/`, keeps them in `outside/`, and lists them with the reason in the report's new `unreadable` map: - paths vanilla doesn't read (upper case), checked with `horizon_mods::content::check_path`, the game's own rule; - JSON that doesn't parse; - shared tags (`minecraft`, `c`) with `"replace": true`: a content mod may only add to them. A byte-order mark is dropped and the file kept. **ATM10's 42 carried mods:** 19 files in 7 mods: - Mekanism Tools' `ry_UA.json`; - CTOV's empty tag; - Towns and Towers' seven replacing village and outpost tags; - broken template pools in YUNG's fortresses and jungle temples; - three Pam's recipes with trailing data; - a Macaw's Trapdoors lang file. With #674 on top, the 42 now load as carried (193,762 block states, in a world). Before this I had to set those files aside by hand. `horizon-mods` (no default features, so no wasmtime) moves from a dev-dependency to a dependency. The launcher's lock picks it up through #663. **Second commit: the oracle's facts only for the mods it loaded.** With `oracle/facts.json` present, a mod the oracle didn't load lost every block, because none of its ids were in the facts. That happens when a library it needs is missing. It now keeps the guesses from its blockstates, as it would without an oracle. For ATM10, Regions Unexplored (TerraBlender is CurseForge-only) gets its 805 blocks back. ## Per-mod harness, ATM10's data-tier mods (local, 2026-10-17) - **Oracle run:** NeoForge 21.1.259, 101.7 s. It took 40 of the 42 downloaded jars plus 11 libraries fetched from Modrinth (Architectury, Athena, Cristel Lib, Formations, Fusion, Lithostitched, Mekanism, Moogs Structure Lib, Resourceful Lib, SuperMartijn642 Core Lib, YUNG's API). - **Left out of the oracle:** Moog's Structures (needs OmegaConfig) and Regions Unexplored (needs TerraBlender). Both libraries are CurseForge-only. - **Exported:** 9,633 mod blocks, 10,597 items, 3,988 recipes. Then carry, then `tools/mod_port_harness.py`. | mod | result | blocks | shapes | drops | placement | tags | recipes | items | |---|---|---:|---:|---:|---:|---:|---:|---:| | Connected Glass | **pass** | 119/119 | 1700/1700 | 11900/11900 | 238/238 | 68/68 | 301/301 | 119/119 | | Macaw's Trapdoors | **pass** | 179/179 | 11456/11456 | 10024/10024 | 358/358 | 534/534 | 191/191 | 191/191 | | Luminax | fail | 192/192 | 13984/13984 | 12096/12096 | 320/384 | 288/288 | 192/192 | 192/192 | | Chipped | fail | 6857/6981 | 46396/46443 | 1449/149093 | 13548/13714 | 11984/12378 | 6/13 | 6849/6973 | | Glassential | fail | 105/114 | 4727/5177 | 6447/6447 | 210/210 | 105/105 | 143/143 | 106/115 | | Macaw's Doors | fail | 239/245 | 12352/15296 | 13384/13384 | 478/478 | 941/941 | 256/257 | 251/257 | | Macaw's Fences | fail | 150/180 | 4032/4800 | 33600/33600 | 300/300 | 432/432 | 222/222 | 150/180 | | Macaw's Paths | fail | 234/315 | 4472/4602 | 6734/6734 | 468/468 | 416/416 | 315/315 | 234/315 | | Macaw's Holidays | fail | 57/334 | 622/622 | 2394/2394 | 114/114 | 61/66 | 325/327 | 57/335 | | Macaw's Stairs | fail | 28/224 | 0/28 | 196/196 | 56/56 | 28/28 | 224/224 | 28/224 | | Macaw's Roofs | fail | 10/605 | 35/35 | 245/245 | 20/20 | 10/10 | 607/607 | 12/607 | | Macaw's Bridges | fail | 0/145 | – | – | – | – | 252/254 | 1/146 | | Mekanism Tools | fail | – | – | – | – | – | 4/87 | 72/72 | | Pam's Food Extended | fail | – | – | – | – | – | 21/855 | 6/871 | The other 28 are structure, worldgen and biome mods with no blocks, items or recipes of their own. The harness compares nothing for them yet (it doesn't compare worldgen), so they count as partial. Most of the failures are blocks whose vanilla class has no vanilla block with the same properties: roofs, bridges and stairs of their own shape, which API 0.2 can't express. Chipped's drops fail the other way round: in the oracle its blocks drop themselves, and in Horizon they drop nothing. Its jar ships no loot table for most of them (7 of about 7,000; the mod adds the rest at runtime), so the carry should write the self-drop table the oracle shows. The coverage report built from these results: 2 ported, 40 partial, 23 not yet of ATM10's 65 data-tier mods (12 of the 23 wait on CurseForge jars). Checks: `cargo fmt`; `cargo clippy -p horizon-port-pack --all-targets -D warnings`; `cargo test -p horizon-port-pack` (21 pass; the carry test covers the four unreadable cases). Local parity: no harness depends on `horizon-port-pack`. 🤖 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-02 15:58: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#2726
No description provided.