[PR #630] [MERGED] Content mods: load real carried-over mods (large tables, convention tags, mod recipes) #2683

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

📋 Pull Request Information

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

Base: main ← Head: feat/mod-content-real-mods


📝 Commits (1)

  • ddc115e Content mods: load real carried-over mods (large tables, convention tags, mod recipes)

📊 Changes

12 files changed (+168 additions, -43 deletions)

View changed files

📝 crates/horizon-client/src/collisions.rs (+1 -1)
📝 crates/horizon-client/src/items.rs (+14 -6)
📝 crates/horizon-client/src/light.rs (+1 -1)
📝 crates/horizon-client/src/mod_content.rs (+81 -2)
📝 crates/horizon-client/src/mod_content_tests.rs (+18 -4)
📝 crates/horizon-client/src/models.rs (+1 -1)
📝 crates/horizon-client/src/motion.rs (+1 -1)
📝 crates/horizon-client/src/stations.rs (+17 -10)
📝 crates/horizon-mods/src/content.rs (+10 -6)
📝 crates/horizon-world/src/nbt.rs (+12 -0)
📝 crates/horizon-world/src/worldgen/generator_blocks.rs (+6 -8)
📝 docs/mods.md (+6 -3)

📄 Description

First of a stack that takes modpack porting from a toy mod to real ATM10 mods (docs/modpacks.md). This PR: the game side.

Loading seven real NeoForge 1.21.1 mods carried over by horizon-port-pack (Cloud Glass, Factory Blocks, Glassential, Macaw's Doors, Fences, Paths and Trapdoors: about 1,000 blocks) broke the content root in four places:

  • Large per-state tables. The NBT tables (cached collision, occlusion, movement, worldgen block properties and support) passed the NBT reader's 1M-node cap once mod states were appended. They are trusted prepared tables with one row per state, so they now read and write with Limits::tables() (16M nodes, 256 MiB) wherever they are loaded.
  • Relative base. The overlay linked the base root by the path it was given, so a relative base gave dangling links. The base is made absolute first.
  • Tags naming unknown ids. Carried-over tags name blocks the port left out and other mods' items. Vanilla fails such a tag as a whole. Entries naming ids nobody registers, or tags nobody defines, are now dropped, so the rest of the tag loads.
  • Convention tags. Mods use c: tags (c:dyes/red, c:glass_blocks/colorless). Content mods may add to data/c/tags/ as they do to vanilla's. With content mods loaded, the tag loaders read the c namespace and the mods' own namespaces.

Stonecutter and smithing recipes in mod namespaces now load too (ids <ns>:<name>), as crafting and cooking recipes already did. With no content mod nothing changes: the loaders read the minecraft namespace only.

Stack: this → #631 (carry from the oracle) → #632 (per-mod harness) → #633 (coverage report) → #648 (state limit, measured against NeoForge); #647 (textures past 2048 layers) is separate, on main. Not merged by me.

Checks

  • cargo fmt --all --check: clean
  • cargo clippy --workspace --all-targets -- -D warnings (release profile, -j $FLEET_LOAD_JOBS): clean
  • Crate tests: horizon-client mod_content (6), horizon-mods, horizon-port-pack (17): pass
  • Local parity on the top of this stack (tools/parity.py --changed origin/main, Mac mini, 3 jobs): 293 passed, 0 failed in 225 min

🤖 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/630 **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:** `feat/mod-content-real-mods` --- ### 📝 Commits (1) - [`ddc115e`](https://github.com/horizon-rust/horizon/commit/ddc115e969690c3a868283b540af534cc9465310) Content mods: load real carried-over mods (large tables, convention tags, mod recipes) ### 📊 Changes **12 files changed** (+168 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/collisions.rs` (+1 -1) 📝 `crates/horizon-client/src/items.rs` (+14 -6) 📝 `crates/horizon-client/src/light.rs` (+1 -1) 📝 `crates/horizon-client/src/mod_content.rs` (+81 -2) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+18 -4) 📝 `crates/horizon-client/src/models.rs` (+1 -1) 📝 `crates/horizon-client/src/motion.rs` (+1 -1) 📝 `crates/horizon-client/src/stations.rs` (+17 -10) 📝 `crates/horizon-mods/src/content.rs` (+10 -6) 📝 `crates/horizon-world/src/nbt.rs` (+12 -0) 📝 `crates/horizon-world/src/worldgen/generator_blocks.rs` (+6 -8) 📝 `docs/mods.md` (+6 -3) </details> ### 📄 Description First of a stack that takes modpack porting from a toy mod to real ATM10 mods (docs/modpacks.md). This PR: the game side. Loading seven real NeoForge 1.21.1 mods carried over by `horizon-port-pack` (Cloud Glass, Factory Blocks, Glassential, Macaw's Doors, Fences, Paths and Trapdoors: about 1,000 blocks) broke the content root in four places: - **Large per-state tables.** The NBT tables (cached collision, occlusion, movement, worldgen block properties and support) passed the NBT reader's 1M-node cap once mod states were appended. They are trusted prepared tables with one row per state, so they now read and write with `Limits::tables()` (16M nodes, 256 MiB) wherever they are loaded. - **Relative base.** The overlay linked the base root by the path it was given, so a relative base gave dangling links. The base is made absolute first. - **Tags naming unknown ids.** Carried-over tags name blocks the port left out and other mods' items. Vanilla fails such a tag as a whole. Entries naming ids nobody registers, or tags nobody defines, are now dropped, so the rest of the tag loads. - **Convention tags.** Mods use `c:` tags (`c:dyes/red`, `c:glass_blocks/colorless`). Content mods may add to `data/c/tags/` as they do to vanilla's. With content mods loaded, the tag loaders read the `c` namespace and the mods' own namespaces. Stonecutter and smithing recipes in mod namespaces now load too (ids `<ns>:<name>`), as crafting and cooking recipes already did. With no content mod nothing changes: the loaders read the `minecraft` namespace only. Stack: **this** → #631 (carry from the oracle) → #632 (per-mod harness) → #633 (coverage report) → #648 (state limit, measured against NeoForge); #647 (textures past 2048 layers) is separate, on main. Not merged by me. ## Checks - `cargo fmt --all --check`: clean - `cargo clippy --workspace --all-targets -- -D warnings` (release profile, `-j $FLEET_LOAD_JOBS`): clean - Crate tests: `horizon-client` mod_content (6), `horizon-mods`, `horizon-port-pack` (17): pass - Local parity on the top of this stack (`tools/parity.py --changed origin/main`, Mac mini, 3 jobs): **293 passed, 0 failed** in 225 min 🤖 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:13 +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#2683
No description provided.