[PR #1777] [MERGED] Lithostitched: limited and guaranteed elements, pool and processor modifiers #3753

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

📋 Pull Request Information

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

Base: main ← Head: feat/lithostitched-elements


📝 Commits (4)

  • cc2a2a8 Lithostitched's limited and guaranteed elements and its processor-list modifiers
  • 907ae1b Merge origin/main; a fallback pool's guaranteed elements are tried too
  • c95194b Merge remote-tracking branch 'origin/main' into HEAD
  • c556f5b Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

8 files changed (+443 additions, -88 deletions)

View changed files

📝 crates/horizon-client/src/mod_content.rs (+23 -8)
📝 crates/horizon-client/src/mod_content_tests.rs (+24 -4)
📝 crates/horizon-port-pack/src/lithostitched.rs (+78 -35)
📝 crates/horizon-world/src/worldgen/structure/jigsaw.rs (+226 -22)
📝 docs/modpacks.md (+8 -1)
📝 docs/mods.md (+12 -5)
📝 tools/test_structure_blocks_parity.py (+14 -6)
📝 tools/test_structure_layout_parity.py (+58 -7)

📄 Description

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

Clean-room: implemented from cleanroom/structures/spec-lithostitched.md §2, §3 and §6 (modifiers, limited / guaranteed / delegating elements, IQ-9); no mod source read.

Stacked on #1765 (feat/lithostitched-processors).

What

  • Pool elements. lithostitched:limited and lithostitched:guaranteed are read by the game as their delegate plus a limit:
    • limited keeps at most limit pieces of that element per start;
    • guaranteed (count, default 1) is tried first at every jigsaw of its pool until placed count times;
    • both respect min_depth.
    • delegating places its delegate.
    • The port keeps limited (with a limit) and guaranteed as written. A limited without limit and every delegating are unwrapped and counted as lost.
  • Modifiers.
    • add_template_pool_elements and add_processor_list_processors become horizon:add_to files.
    • horizon:add_to now also merges processor lists.
    • Additions are applied by horizon:priority, lower first, 1000 when absent (mod_content.rs).
  • Harnesses.
    • The layout and blocks harnesses get a lithostitched-probe profile. It is the spec team's own data pack, built at run time from the oracle profile and carried as one more mod.
    • The layout check counts the limited and guaranteed templates per start.
  • Docs: docs/mods.md (additions, priority, the elements) and docs/modpacks.md (the Lithostitched paragraph).

Results

  • Layout lithostitched-probe (10 Horizon starts, 2 skipped because Horizon has no start there). Neither template ever exceeds its limit of 1:
    • taiga_small_house_1, the limited element with limit 1: in 10 of 10 Horizon starts; the oracle has it in 9.
    • snowy_library_1, the guaranteed element: in 9 of 10; the oracle has 9.
  • Blocks lithostitched-probe: 801,997 of 821,066 piece positions.
    • Swaps and references match exactly.
    • What differs is L6's stand-in random (blackstone/deepslate 2,032; crimson/birch 1,098) and decoration. These are listed as KNOWN.
  • Unchanged:
    • layout lithostitched: 22 of 31 plus 9 known;
    • layout betterdungeons: 82 of 84 plus 2 known;
    • blocks ctov: 2,195,966 of 2,251,716.

Spec questions

  • IQ-10: the min_depth convention, the guaranteed priority, whether the start counts, the JSON key, and a limited without limit.
  • IQ-11: the order modifiers are applied in.

YUNG regressions closed

None: this PR is Lithostitched only.

pr_ready (tools/pr_ready.py --quick --base origin/feat/lithostitched-processors on ludovics-mac-mini, against origin/feat/lithostitched-processors at eb6c81945, 11 min 43 s)

Check Result
Scope ✅ 8 files, +461 −113
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 257 run, FAILED (errors=2) (28 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 3 s)
tests: horizon-client, horizon-port-pack, horizon-world ✅ 1494 passed (6 min 32 s)
doc tests ✅ 0 passed (5 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (1 min 19 s)
launcher tests ✅ 118 passed (1 min 49 s)
Parity ➖ 311 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 299 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Python: the same 2 macOS-only errors as on main.

🤖 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/1777 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/lithostitched-elements` --- ### 📝 Commits (4) - [`cc2a2a8`](https://github.com/horizon-rust/horizon/commit/cc2a2a8741cc51b5acfac6b92c82e3f764cef36a) Lithostitched's limited and guaranteed elements and its processor-list modifiers - [`907ae1b`](https://github.com/horizon-rust/horizon/commit/907ae1bbb1999a53cecadb5457f1e5aacfd216e5) Merge origin/main; a fallback pool's guaranteed elements are tried too - [`c95194b`](https://github.com/horizon-rust/horizon/commit/c95194b676e64512380eaf7db775ad602c125517) Merge remote-tracking branch 'origin/main' into HEAD - [`c556f5b`](https://github.com/horizon-rust/horizon/commit/c556f5b5b8f2bccffc1d596ca1a9600ab38f9d4f) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **8 files changed** (+443 additions, -88 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mod_content.rs` (+23 -8) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+24 -4) 📝 `crates/horizon-port-pack/src/lithostitched.rs` (+78 -35) 📝 `crates/horizon-world/src/worldgen/structure/jigsaw.rs` (+226 -22) 📝 `docs/modpacks.md` (+8 -1) 📝 `docs/mods.md` (+12 -5) 📝 `tools/test_structure_blocks_parity.py` (+14 -6) 📝 `tools/test_structure_layout_parity.py` (+58 -7) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean-room: implemented from cleanroom/structures/spec-lithostitched.md §2, §3 and §6 (modifiers, `limited` / `guaranteed` / `delegating` elements, IQ-9); no mod source read. Stacked on #1765 (`feat/lithostitched-processors`). ## What - **Pool elements.** `lithostitched:limited` and `lithostitched:guaranteed` are read by the game as their delegate plus a limit: - `limited` keeps at most `limit` pieces of that element per start; - `guaranteed` (`count`, default 1) is tried first at every jigsaw of its pool until placed `count` times; - both respect `min_depth`. - `delegating` places its delegate. - The port keeps `limited` (with a `limit`) and `guaranteed` as written. A `limited` without `limit` and every `delegating` are unwrapped and counted as lost. - **Modifiers.** - `add_template_pool_elements` and `add_processor_list_processors` become `horizon:add_to` files. - `horizon:add_to` now also merges processor lists. - Additions are applied by `horizon:priority`, lower first, 1000 when absent (`mod_content.rs`). - **Harnesses.** - The layout and blocks harnesses get a `lithostitched-probe` profile. It is the spec team's own data pack, built at run time from the oracle profile and carried as one more mod. - The layout check counts the limited and guaranteed templates per start. - **Docs:** `docs/mods.md` (additions, priority, the elements) and `docs/modpacks.md` (the Lithostitched paragraph). ## Results - Layout `lithostitched-probe` (10 Horizon starts, 2 skipped because Horizon has no start there). Neither template ever exceeds its limit of 1: - `taiga_small_house_1`, the `limited` element with limit 1: in 10 of 10 Horizon starts; the oracle has it in 9. - `snowy_library_1`, the `guaranteed` element: in 9 of 10; the oracle has 9. - Blocks `lithostitched-probe`: 801,997 of 821,066 piece positions. - Swaps and references match exactly. - What differs is L6's stand-in random (blackstone/deepslate 2,032; crimson/birch 1,098) and decoration. These are listed as KNOWN. - Unchanged: - layout `lithostitched`: 22 of 31 plus 9 known; - layout `betterdungeons`: 82 of 84 plus 2 known; - blocks `ctov`: 2,195,966 of 2,251,716. ## Spec questions - IQ-10: the `min_depth` convention, the guaranteed priority, whether the start counts, the JSON key, and a `limited` without `limit`. - IQ-11: the order modifiers are applied in. ## YUNG regressions closed None: this PR is Lithostitched only. **pr_ready** (`tools/pr_ready.py --quick --base origin/feat/lithostitched-processors` on ludovics-mac-mini, against origin/feat/lithostitched-processors at eb6c81945, 11 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +461 −113 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 257 run, FAILED (errors=2) (28 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 3 s) | | tests: horizon-client, horizon-port-pack, horizon-world | ✅ 1494 passed (6 min 32 s) | | doc tests | ✅ 0 passed (5 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (1 min 19 s) | | launcher tests | ✅ 118 passed (1 min 49 s) | | Parity | ➖ 311 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 299 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Python: the same 2 macOS-only errors as on main. 🤖 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:12:03 +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#3753
No description provided.