[PR #764] [MERGED] Content mods: structure mods' worldgen joins the worldgen bundles #2792

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

📋 Pull Request Information

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

Base: main ← Head: feat/mod-worldgen


📝 Commits (2)

  • 24fd51b Content mods: keep the built content root for later starts
  • 65fc3b9 Content mods: structure mods' worldgen joins the worldgen bundles

📊 Changes

3 files changed (+279 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/mod_content.rs (+156 -4)
📝 crates/horizon-client/src/mod_content_tests.rs (+116 -0)
📝 crates/horizon-mods/src/content.rs (+7 -0)

📄 Description

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

Stacked on #756 (both edit mod_content.rs): review the last commit. Once #756 merges, this diff drops to that commit.

Brief priority 2: mod worldgen in Horizon worlds (game side; the carry side is #763).

What

docs/modpacks.md: MVS's "784 worldgen files are carried but not yet read by the game". The content root now merges content mods' worldgen into the bundles the generator reads:

  • data/<ns>/worldgen/{structure,structure_set,template_pool,processor_list,configured_feature,placed_feature}/**.json join worldgen/*.json (id → JSON) next to vanilla's entries.
  • data/<ns>/structure/**.nbt templates are linked under worldgen/structure/<ns>/, where the template loader looks.
  • data/<ns>/tags/worldgen/biome/*.json merge into worldgen/biome_tags.json with vanilla's tag merge (replace, includes). Biome ids and tags that Horizon doesn't have are dropped, as missing optional entries are in vanilla. Tag building is strict, so one unknown biome would otherwise stop worldgen.

Without mods nothing changes: the base bundles are read as before. Mod biomes, noise and density functions are not carried yet (Regions Unexplored and the like).

Proof

  • Test content_root_carries_a_structure_mod: a "huts" mod with a structure, set, pool, template and a biome tag naming an unknown biome. The root has its entries, the tag keeps only #minecraft:is_overworld and minecraft:plains, and VanillaTerrain::locate(["huts:hut"]) finds the structure.

  • In game: the 40 ATM10 mods carried with #763, seed 1234, --offscreen, horizon-ctl:

    • /locate structure mvs:azelea_house found one at (-560, 48), 27 blocks from spawn;
    • dungeons_arise:bandit_towers was found at 8,034 blocks and structory:abandoned_chapel at 1,603;
    • the blocks around (-560, 48) are the template's: 131 waxed copper blocks, azalea and flowering azalea leaves, 156 moss blocks, cave vines and green glass panes, together with spruce;
    • the game log has no worldgen errors.

    The screenshot stays local because it shows the mod's build.

  • Rendering doesn't change: it is new terrain content, not a renderer change.

Checks

  • cargo fmt --all -- --check, cargo clippy -p horizon-client -p horizon-mods --all-targets -- -D warnings: clean.
  • cargo test -p horizon-client mod_content: passes (both new tests).
  • Parity: tools/parity.py --changed origin/main on this work merged together (#753, #754, #755, #756, #764 and #762): 298 harnesses selected, all pass. Three failed on the first run for reasons outside this code, and their reruns passed: datafix lost its connection while generating 1.8.9 sample worlds (load average 140), the Java oracle timed out in decoration, and another session's pkill killed a run.

🤖 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/764 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/mod-worldgen` --- ### 📝 Commits (2) - [`24fd51b`](https://github.com/horizon-rust/horizon/commit/24fd51b186b850b30e12797a5e13767189eb75c7) Content mods: keep the built content root for later starts - [`65fc3b9`](https://github.com/horizon-rust/horizon/commit/65fc3b9f941d4573aded7e041bb2683c0860f655) Content mods: structure mods' worldgen joins the worldgen bundles ### 📊 Changes **3 files changed** (+279 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mod_content.rs` (+156 -4) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+116 -0) 📝 `crates/horizon-mods/src/content.rs` (+7 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Stacked on #756** (both edit `mod_content.rs`): review the last commit. Once #756 merges, this diff drops to that commit. Brief priority 2: mod worldgen in Horizon worlds (game side; the carry side is #763). ## What docs/modpacks.md: MVS's "784 worldgen files are carried but not yet read by the game". The content root now merges content mods' worldgen into the bundles the generator reads: - `data/<ns>/worldgen/{structure,structure_set,template_pool,processor_list,configured_feature,placed_feature}/**.json` join `worldgen/*.json` (id → JSON) next to vanilla's entries. - `data/<ns>/structure/**.nbt` templates are linked under `worldgen/structure/<ns>/`, where the template loader looks. - `data/<ns>/tags/worldgen/biome/*.json` merge into `worldgen/biome_tags.json` with vanilla's tag merge (`replace`, includes). Biome ids and tags that Horizon doesn't have are dropped, as missing optional entries are in vanilla. Tag building is strict, so one unknown biome would otherwise stop worldgen. Without mods nothing changes: the base bundles are read as before. Mod biomes, noise and density functions are not carried yet (Regions Unexplored and the like). ## Proof - Test `content_root_carries_a_structure_mod`: a "huts" mod with a structure, set, pool, template and a biome tag naming an unknown biome. The root has its entries, the tag keeps only `#minecraft:is_overworld` and `minecraft:plains`, and `VanillaTerrain::locate(["huts:hut"])` finds the structure. - In game: the 40 ATM10 mods carried with #763, seed 1234, `--offscreen`, `horizon-ctl`: - `/locate structure mvs:azelea_house` found one at (-560, 48), 27 blocks from spawn; - `dungeons_arise:bandit_towers` was found at 8,034 blocks and `structory:abandoned_chapel` at 1,603; - the blocks around (-560, 48) are the template's: 131 waxed copper blocks, azalea and flowering azalea leaves, 156 moss blocks, cave vines and green glass panes, together with spruce; - the game log has no worldgen errors. The screenshot stays local because it shows the mod's build. - Rendering doesn't change: it is new terrain content, not a renderer change. ## Checks - `cargo fmt --all -- --check`, `cargo clippy -p horizon-client -p horizon-mods --all-targets -- -D warnings`: clean. - `cargo test -p horizon-client mod_content`: passes (both new tests). - Parity: `tools/parity.py --changed origin/main` on this work merged together (#753, #754, #755, #756, #764 and #762): 298 harnesses selected, **all pass**. Three failed on the first run for reasons outside this code, and their reruns passed: datafix lost its connection while generating 1.8.9 sample worlds (load average 140), the Java oracle timed out in decoration, and another session's `pkill` killed a run. 🤖 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:59:06 +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#2792
No description provided.