[PR #763] [MERGED] Carry: structure mods' worldgen in vanilla's types, with the loader's biome tags #2790

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

📋 Pull Request Information

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

Base: main ← Head: feat/carry-worldgen


📝 Commits (2)

  • d3673b1 Carry: write the self-drop loot table a mod registers in code
  • 9afb6d7 Carry: structure mods' worldgen in vanilla's types, with the loader's biome tags

📊 Changes

6 files changed (+484 additions, -2 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+76 -1)
📝 crates/horizon-port-pack/src/fetch.rs (+22 -0)
📝 crates/horizon-port-pack/src/lib.rs (+1 -0)
📝 crates/horizon-port-pack/src/oracle.rs (+119 -0)
📝 crates/horizon-port-pack/src/pipeline.rs (+4 -1)
➕ crates/horizon-port-pack/src/worldgen.rs (+262 -0)

📄 Description

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

Stacked on #762 (both edit the same lines of carry.rs): review the last commit. Once #762 merges, this diff drops to that commit.

Brief priority 2, mod worldgen carry (port-pack side; the game side is #764).

What

Structure mods write their worldgen with their library's types and NeoForge's convention biome tags. Horizon's worldgen, like vanilla's, only knows vanilla's types. The carry now:

  • maps the library types that are vanilla's under another name, in data/<id>/worldgen/**/*.json:

    • lithostitched:jigsaw, MoogsStructureLib's moogs_structures_generic_jigsaw_structure and Repurposed Structures' generic_jigsaw_structure become minecraft:jigsaw;
    • their advanced_random_spread becomes minecraft:random_spread;
    • pool elements: versioned_single_pool_element becomes single_pool_element, the legacy ocean-bottom element becomes legacy_single_pool_element, and their empty_pool_element becomes vanilla's.

    The extra fields stay in the file, and the game reads the fields vanilla's types have. The rules those library types add on top of vanilla's are lost: a structure that should not start in liquid, a minimum distance from the origin, a cap per piece. So a mapped structure keeps its pieces and its spacing but can start where the mod would not. The report counts every rewrite.

  • adds the loader's convention biome tags (#c:is_forest, #c:is_desert, ...) that the mod's structures and biome tags use. The tags come from the NeoForge loader jar (<work>/loader/neoforge-<version>-universal.jar, data/c/tags/worldgen/biome/, #c: includes resolved). fetch downloads that jar from NeoForge's maven when it is missing, checked against the published SHA-1. It is dev-only, like the other downloads, and stays in the work folder.

  • reports per mod what it mapped and the types it left as they were (carry-report.json: worldgen_types, convention_biome_tags).

Unknown types are left untouched. The game skips the structures it cannot decode, so a pack with unsupported types still loads.

On ATM10 (the 40 data-tier mods carried)

  • 1,061 files mapped: MVS 413, MNS 210, MSS 157, MES 110, Repurposed Structures 104, ChoiceTheorem's Overhauled Village 66, MO Structures 1.
  • 103 convention biome tags written.
  • Already vanilla's types, nothing to map: When Dungeons Arise, Structory, Towns and Towers, ...
  • Still unsupported (code-defined, need API work): YUNG's API elements and jigsaws (481 + 10, the "Better X" mods), Formations' elements and structures (179), Moog's and Repurposed's nether jigsaw variants (69), MO Structures' own types (38), and Repurposed's mineshaft, mansion, monument and city types.

In game (with #764), seed 1234: /locate structure mvs:azelea_house finds one 27 blocks from spawn, and it is generated there. MoogsStructureLib's jigsaw became vanilla's, and copper roofs, azalea and moss blocks stand where the template puts them. dungeons_arise:bandit_towers and structory:abandoned_chapel locate too. The game log has no worldgen errors. The screenshot stays local because the structure is the mod's work, not something to publish.

Checks

  • cargo fmt --all -- --check, cargo clippy -p horizon-port-pack --all-targets -- -D warnings: clean.
  • cargo test -p horizon-port-pack: 25 passed (with #762's), including maps_library_types_to_vanillas and convention_tags_include_theirs.
  • Parity: no harness depends on horizon-port-pack (parity.py --changed-files selects 0).

Needs Ludovic

Nothing to merge it. Ports and jars stay in the local work folder; nothing is published.

🤖 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/763 **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/carry-worldgen` --- ### 📝 Commits (2) - [`d3673b1`](https://github.com/horizon-rust/horizon/commit/d3673b1509f56cf852e35268843773fc82dd1dc8) Carry: write the self-drop loot table a mod registers in code - [`9afb6d7`](https://github.com/horizon-rust/horizon/commit/9afb6d76de42be1cb68525490d62599ce7910c89) Carry: structure mods' worldgen in vanilla's types, with the loader's biome tags ### 📊 Changes **6 files changed** (+484 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+76 -1) 📝 `crates/horizon-port-pack/src/fetch.rs` (+22 -0) 📝 `crates/horizon-port-pack/src/lib.rs` (+1 -0) 📝 `crates/horizon-port-pack/src/oracle.rs` (+119 -0) 📝 `crates/horizon-port-pack/src/pipeline.rs` (+4 -1) ➕ `crates/horizon-port-pack/src/worldgen.rs` (+262 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Stacked on #762** (both edit the same lines of `carry.rs`): review the last commit. Once #762 merges, this diff drops to that commit. Brief priority 2, mod worldgen carry (port-pack side; the game side is #764). ## What Structure mods write their worldgen with their library's types and NeoForge's convention biome tags. Horizon's worldgen, like vanilla's, only knows vanilla's types. The carry now: - **maps the library types that are vanilla's under another name**, in `data/<id>/worldgen/**/*.json`: - `lithostitched:jigsaw`, MoogsStructureLib's `moogs_structures_generic_jigsaw_structure` and Repurposed Structures' `generic_jigsaw_structure` become `minecraft:jigsaw`; - their `advanced_random_spread` becomes `minecraft:random_spread`; - pool elements: `versioned_single_pool_element` becomes `single_pool_element`, the legacy ocean-bottom element becomes `legacy_single_pool_element`, and their `empty_pool_element` becomes vanilla's. The extra fields stay in the file, and the game reads the fields vanilla's types have. The rules those library types add on top of vanilla's are lost: a structure that should not start in liquid, a minimum distance from the origin, a cap per piece. So a mapped structure keeps its pieces and its spacing but can start where the mod would not. The report counts every rewrite. - **adds the loader's convention biome tags** (`#c:is_forest`, `#c:is_desert`, ...) that the mod's structures and biome tags use. The tags come from the NeoForge loader jar (`<work>/loader/neoforge-<version>-universal.jar`, `data/c/tags/worldgen/biome/`, `#c:` includes resolved). `fetch` downloads that jar from NeoForge's maven when it is missing, checked against the published SHA-1. It is dev-only, like the other downloads, and stays in the work folder. - **reports** per mod what it mapped and the types it left as they were (`carry-report.json`: `worldgen_types`, `convention_biome_tags`). Unknown types are left untouched. The game skips the structures it cannot decode, so a pack with unsupported types still loads. ## On ATM10 (the 40 data-tier mods carried) - 1,061 files mapped: MVS 413, MNS 210, MSS 157, MES 110, Repurposed Structures 104, ChoiceTheorem's Overhauled Village 66, MO Structures 1. - 103 convention biome tags written. - Already vanilla's types, nothing to map: When Dungeons Arise, Structory, Towns and Towers, ... - Still unsupported (code-defined, need API work): YUNG's API elements and jigsaws (481 + 10, the "Better X" mods), Formations' elements and structures (179), Moog's and Repurposed's nether jigsaw variants (69), MO Structures' own types (38), and Repurposed's mineshaft, mansion, monument and city types. In game (with #764), seed 1234: `/locate structure mvs:azelea_house` finds one 27 blocks from spawn, and it is generated there. MoogsStructureLib's jigsaw became vanilla's, and copper roofs, azalea and moss blocks stand where the template puts them. `dungeons_arise:bandit_towers` and `structory:abandoned_chapel` locate too. The game log has no worldgen errors. The screenshot stays local because the structure is the mod's work, not something to publish. ## Checks - `cargo fmt --all -- --check`, `cargo clippy -p horizon-port-pack --all-targets -- -D warnings`: clean. - `cargo test -p horizon-port-pack`: 25 passed (with #762's), including `maps_library_types_to_vanillas` and `convention_tags_include_theirs`. - Parity: no harness depends on `horizon-port-pack` (`parity.py --changed-files` selects 0). ## Needs Ludovic Nothing to merge it. Ports and jars stay in the local work folder; nothing is published. 🤖 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:04 +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#2790
No description provided.