[PR #974] [MERGED] Carry: Towns and Towers' namespaces (kaisyn, towns_and_towers) as its manifest's namespaces #2955

Closed
opened 2026-11-02 16:00:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/carry-extra-namespaces


📝 Commits (1)

  • 0a733ce Carry: the namespaces a mod's own files name, as its manifest's namespaces

📊 Changes

3 files changed (+257 additions, -23 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+226 -18)
📝 crates/horizon-port-pack/src/pipeline.rs (+18 -1)
📝 docs/modpacks.md (+13 -4)

📄 Description

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

Stacked on #969 (the manifest's namespaces): merge #969 first, then retarget this PR to main.

What

Towns and Towers (mod id t_and_t) ships all 60 of its structures, pools, templates and loot under kaisyn and towns_and_towers, so carry put them in outside/ and its carried mod held three tag files. Carry now claims those namespaces for the mod and lists them in horizon-mod.toml.

  • Which namespaces (carry::extra_namespaces): a namespace the jar ships files under becomes the mod's when the mod's own files (its id's files, its tag additions and the namespaces already claimed, repeated until nothing changes) name ids in it, and no mod of the pack has that namespace as its id. minecraft, c, horizon and the loaders' namespaces are never claimed. So compat files for mods outside the pack (CTOV's wares and monobank, YUNG's morevillagers tags, Macaw's diagonalfences) and configs of pack mods (T&T's cristellib structure configs) stay outside. Over ATM10's 42 jars only T&T claims anything: kaisyn and towns_and_towers.
  • Files in a claimed namespace go through the same upgrades as the mod id's (block states, processors, loot tables). Blocks and items are still declared only from the id's blockstates and item models.
  • A tag in the mod's own namespaces that replaces (T&T's 59 has_structure biome tags) is carried as an addition: no pack before the mod defines that tag. Replacing a shared tag stays refused, as before.
  • carry takes a Pack (the mods ported along, and every mod of the pack) instead of the loaded closure.

Proof (ATM10's 42 carried mods, chunkgen_bench --starts, overworld)

seed 1234 seed 2
chunks -64..63: T&T starts (pieces) 7 (76) 7 (712)
chunks -256..255: T&T starts (pieces) 94 (3,807) 95 (4,722)
before 0 0
  • Seed 1234, chunks -256..255: 46 ocean wreckages, 33 villages across 13 village types (forest 12, swamp 5, savanna plateau 4, ...) and 15 outposts across 12 biome types.
  • Seed 2: forest, beach, ocean, birch, jungle and snowy taiga villages and outposts, 21 structure types.
  • The other mods' counts are unchanged (chunks -64..63 at seed 1234: 362 starts before, 369 now; the 7 new ones are T&T's).
  • Tests: claims_the_namespaces_its_files_name covers a two-step claim (a tag addition naming a structure, whose pool namespace is claimed in turn), a compat namespace and a pack mod's namespace left outside, a loader namespace, no declarations from another namespace, and a replacing own tag carried as an addition. The game reads the carried folder with horizon_mods::Content.

Self-check

cargo fmt --all --check                                         ok
cargo clippy -p horizon-port-pack --all-targets -- -D warnings  ok
cargo test -p horizon-port-pack                                 47 passed
horizon-port-pack carry <atm10> t_and_t                         1,191 files, namespaces kaisyn + towns_and_towers, 10 outside

No game code changes in this PR (carry is a dev and launcher tool), so no parity harness covers it.

Left / needs a decision

  • T&T also replaces 7 vanilla biome tags (minecraft:has_structure/pillager_outpost becomes plains only, plus the village and desert pyramid tags) so that its outposts take over from vanilla's elsewhere. The content fence refuses replacing shared tags, so vanilla outposts still generate next to T&T's in those biomes. Allowing a mod to replace a vanilla tag is a fence change: Ludovic or the orchestrator decides.

🤖 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/974 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/carry-extra-namespaces` --- ### 📝 Commits (1) - [`0a733ce`](https://github.com/horizon-rust/horizon/commit/0a733cec552bab05b8a52e63c89f5c446f952fa3) Carry: the namespaces a mod's own files name, as its manifest's namespaces ### 📊 Changes **3 files changed** (+257 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+226 -18) 📝 `crates/horizon-port-pack/src/pipeline.rs` (+18 -1) 📝 `docs/modpacks.md` (+13 -4) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #969 (the manifest's `namespaces`): merge #969 first, then retarget this PR to main. ## What Towns and Towers (mod id `t_and_t`) ships all 60 of its structures, pools, templates and loot under `kaisyn` and `towns_and_towers`, so carry put them in `outside/` and its carried mod held three tag files. Carry now claims those namespaces for the mod and lists them in `horizon-mod.toml`. - **Which namespaces** (`carry::extra_namespaces`): a namespace the jar ships files under becomes the mod's when the mod's own files (its id's files, its tag additions and the namespaces already claimed, repeated until nothing changes) name ids in it, and no mod of the pack has that namespace as its id. `minecraft`, `c`, `horizon` and the loaders' namespaces are never claimed. So compat files for mods outside the pack (CTOV's `wares` and `monobank`, YUNG's `morevillagers` tags, Macaw's `diagonalfences`) and configs of pack mods (T&T's `cristellib` structure configs) stay outside. Over ATM10's 42 jars only T&T claims anything: `kaisyn` and `towns_and_towers`. - Files in a claimed namespace go through the same upgrades as the mod id's (block states, processors, loot tables). Blocks and items are still declared only from the id's blockstates and item models. - A tag in the mod's own namespaces that `replace`s (T&T's 59 `has_structure` biome tags) is carried as an addition: no pack before the mod defines that tag. Replacing a shared tag stays refused, as before. - `carry` takes a `Pack` (the mods ported along, and every mod of the pack) instead of the `loaded` closure. ## Proof (ATM10's 42 carried mods, `chunkgen_bench --starts`, overworld) | | seed 1234 | seed 2 | |---|---|---| | chunks -64..63: T&T starts (pieces) | 7 (76) | 7 (712) | | chunks -256..255: T&T starts (pieces) | 94 (3,807) | 95 (4,722) | | before | 0 | 0 | - Seed 1234, chunks -256..255: 46 ocean wreckages, 33 villages across 13 village types (forest 12, swamp 5, savanna plateau 4, ...) and 15 outposts across 12 biome types. - Seed 2: forest, beach, ocean, birch, jungle and snowy taiga villages and outposts, 21 structure types. - The other mods' counts are unchanged (chunks -64..63 at seed 1234: 362 starts before, 369 now; the 7 new ones are T&T's). - Tests: `claims_the_namespaces_its_files_name` covers a two-step claim (a tag addition naming a structure, whose pool namespace is claimed in turn), a compat namespace and a pack mod's namespace left outside, a loader namespace, no declarations from another namespace, and a replacing own tag carried as an addition. The game reads the carried folder with `horizon_mods::Content`. ## Self-check ``` cargo fmt --all --check ok cargo clippy -p horizon-port-pack --all-targets -- -D warnings ok cargo test -p horizon-port-pack 47 passed horizon-port-pack carry <atm10> t_and_t 1,191 files, namespaces kaisyn + towns_and_towers, 10 outside ``` No game code changes in this PR (carry is a dev and launcher tool), so no parity harness covers it. ## Left / needs a decision - T&T also *replaces* 7 vanilla biome tags (`minecraft:has_structure/pillager_outpost` becomes plains only, plus the village and desert pyramid tags) so that its outposts take over from vanilla's elsewhere. The content fence refuses replacing shared tags, so vanilla outposts still generate next to T&T's in those biomes. Allowing a mod to replace a vanilla tag is a fence change: Ludovic or the orchestrator decides. 🤖 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 16:00:23 +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#2955
No description provided.