[PR #1175] [MERGED] Structures: Mo' Structures generate in carried packs #3389

Closed
opened 2026-11-03 04:09:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/mo-structures


📝 Commits (1)

  • 255f196 Structures: Mo' Structures generate (jigsaw with its terrain check, config spacing, exclusion by spread)

📊 Changes

3 files changed (+238 additions, -21 deletions)

View changed files

📝 crates/horizon-port-pack/src/worldgen.rs (+142 -0)
📝 crates/horizon-world/src/worldgen/structure/start.rs (+84 -20)
📝 docs/modpacks.md (+12 -1)

📄 Description

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

What

Mo' Structures' 38 worldgen files (21 structures, 17 structure sets) now generate in a carried pack:

  • Structure mostructures:generic is vanilla's jigsaw plus one start check (ModStructure.canGenerate): the terrain height (WORLD_SURFACE_WG at each chunk's x+7, z+7) over the 5×5 chunks around the start must vary by at most heightRange (-1: no check). Carry writes minecraft:jigsaw with horizon:start_checks: {terrain_radius: 2, terrain_range: N}, which the game already runs. Every Mo' structure projects to WORLD_SURFACE_WG or not at all, the check's default heightmap.
  • Placement mostructures:type is a random spread whose spacing and separation come from the mod's config, not its files (ModStructurePlacement.validate). Carry writes the config's defaults (MoStructuresConfig, by config_key; ATM10 ships no override). Its structure_set_to_avoid (no start within 3 chunks of those sets) becomes horizon:exclusion_zone with a new "their_zones": false.
  • Game: horizon:exclusion_zone gains their_zones (default true, so YUNG's and Repurposed's zones are unchanged). With false the avoided sets are tested by their spread and frequency only, without their own exclusion zones, as isStructureSetNearby does with shouldGenerateNoExclusionCheck.

Still dropped (listed in the carry report): its jungle_rot_processor and simple_cobblestone block-ageing processors (3 uses) and its lake mixin.

Licence: Mo' Structures is LGPL-3.0-only (mods.toml). Only its data is carried, locally, by the player's own horizon-port-pack; nothing of the mod is in the repo. The game side is a generic option of an existing key, written from the mod's observed rules.

Why

modpacks-12 brief, step 1. The doc listed these 38 files as "still lost".

How tested

  • Re-carry of mostructures on the ATM10 work folder: worldgen_types.unsupported goes from {mostructures:generic: 21, mostructures:type: 17} to {} (39 files mapped).
  • chunkgen_bench --starts, overworld chunks -64..63, the 42 carried mods: seed 1234 421 → 434 starts (+13 Mo': 5 pirate ships, 3 churches, a pillager factory, villager market and tower, a tavern, the castle in the sky), seed 2 504 → 520 (+16). Every other start line is identical before and after.
  • Vanilla structure-start oracle, seed 1234 chunks -32..31: 45 of 45 vanilla starts match exactly.
  • Unit tests: mo_structures_become_vanillas_jigsaw_and_spread (port-pack), exclusion_zones_may_skip_the_other_sets_own (horizon-world).
cargo fmt --all --check                                      ok
cargo clippy --workspace --all-targets -- -D warnings        ok (pipefail)
cargo test -p horizon-port-pack                              55 passed
cargo test -p horizon-world --lib                            153 passed, 1 ignored
tools/parity.py --changed origin/main                        run once on the integration commit of the modpacks-12 PRs (results below when done)

Needs Ludovic

Nothing for this PR. (Repurposed Structures' mansions and monuments, the other half of step 1, are not here: see the modpacks-12 final report.)

🤖 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/1175 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/mo-structures` --- ### 📝 Commits (1) - [`255f196`](https://github.com/horizon-rust/horizon/commit/255f1960ee1b9fbfc25b3869b740f957419cdf81) Structures: Mo' Structures generate (jigsaw with its terrain check, config spacing, exclusion by spread) ### 📊 Changes **3 files changed** (+238 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/worldgen.rs` (+142 -0) 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+84 -20) 📝 `docs/modpacks.md` (+12 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Mo' Structures' 38 worldgen files (21 structures, 17 structure sets) now generate in a carried pack: - **Structure** `mostructures:generic` is vanilla's jigsaw plus one start check (ModStructure.canGenerate): the terrain height (`WORLD_SURFACE_WG` at each chunk's x+7, z+7) over the 5×5 chunks around the start must vary by at most `heightRange` (-1: no check). Carry writes `minecraft:jigsaw` with `horizon:start_checks: {terrain_radius: 2, terrain_range: N}`, which the game already runs. Every Mo' structure projects to `WORLD_SURFACE_WG` or not at all, the check's default heightmap. - **Placement** `mostructures:type` is a random spread whose spacing and separation come from the mod's config, not its files (ModStructurePlacement.validate). Carry writes the config's defaults (MoStructuresConfig, by `config_key`; ATM10 ships no override). Its `structure_set_to_avoid` (no start within 3 chunks of those sets) becomes `horizon:exclusion_zone` with a new `"their_zones": false`. - **Game:** `horizon:exclusion_zone` gains `their_zones` (default true, so YUNG's and Repurposed's zones are unchanged). With `false` the avoided sets are tested by their spread and frequency only, without their own exclusion zones, as `isStructureSetNearby` does with `shouldGenerateNoExclusionCheck`. Still dropped (listed in the carry report): its `jungle_rot_processor` and `simple_cobblestone` block-ageing processors (3 uses) and its lake mixin. **Licence:** Mo' Structures is LGPL-3.0-only (`mods.toml`). Only its data is carried, locally, by the player's own `horizon-port-pack`; nothing of the mod is in the repo. The game side is a generic option of an existing key, written from the mod's observed rules. ## Why modpacks-12 brief, step 1. The doc listed these 38 files as "still lost". ## How tested - Re-carry of `mostructures` on the ATM10 work folder: `worldgen_types.unsupported` goes from `{mostructures:generic: 21, mostructures:type: 17}` to `{}` (39 files mapped). - `chunkgen_bench --starts`, overworld chunks -64..63, the 42 carried mods: seed 1234 **421 → 434 starts** (+13 Mo': 5 pirate ships, 3 churches, a pillager factory, villager market and tower, a tavern, the castle in the sky), seed 2 **504 → 520** (+16). Every other start line is identical before and after. - Vanilla structure-start oracle, seed 1234 chunks -32..31: 45 of 45 vanilla starts match exactly. - Unit tests: `mo_structures_become_vanillas_jigsaw_and_spread` (port-pack), `exclusion_zones_may_skip_the_other_sets_own` (horizon-world). ``` cargo fmt --all --check ok cargo clippy --workspace --all-targets -- -D warnings ok (pipefail) cargo test -p horizon-port-pack 55 passed cargo test -p horizon-world --lib 153 passed, 1 ignored tools/parity.py --changed origin/main run once on the integration commit of the modpacks-12 PRs (results below when done) ``` ## Needs Ludovic Nothing for this PR. (Repurposed Structures' mansions and monuments, the other half of step 1, are not here: see the modpacks-12 final report.) 🤖 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-03 04:09:10 +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#3389
No description provided.