[PR #1746] [MERGED] Port YUNG's worldgen as written; delete the old YUNG conversion and assembler #3738

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

📋 Pull Request Information

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

Base: main ← Head: feat/yung-port-as-written


📝 Commits (4)

  • 066f079 Merge remote-tracking branch 'origin/refactor/port-pack-legacy-structure-mods' into feat/yung-port-as-written
  • 379692f Port YUNG's worldgen as written; delete the old YUNG conversion and assembler
  • 3bc38ce YUNG jigsaws: the start is not counted, priority, depth and bounds rules run
  • 35e047f Merge origin/main into feat/yung-port-as-written

📊 Changes

15 files changed (+336 additions, -2382 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+0 -1)
📝 crates/horizon-port-pack/src/legacy_structure_mods/mod.rs (+0 -1)
➖ crates/horizon-port-pack/src/legacy_structure_mods/yung.rs (+0 -1055)
📝 crates/horizon-port-pack/src/lib.rs (+1 -0)
📝 crates/horizon-port-pack/src/processors.rs (+10 -9)
📝 crates/horizon-port-pack/src/worldgen.rs (+4 -3)
➕ crates/horizon-port-pack/src/yung.rs (+102 -0)
📝 crates/horizon-world/src/worldgen/structure.rs (+0 -1)
📝 crates/horizon-world/src/worldgen/structure/enhanced_terrain.rs (+0 -1)
📝 crates/horizon-world/src/worldgen/structure/jigsaw.rs (+111 -65)
📝 crates/horizon-world/src/worldgen/structure/piece_limited.rs (+0 -1)
📝 crates/horizon-world/src/worldgen/structure/start.rs (+3 -68)
➖ crates/horizon-world/src/worldgen/structure/yung.rs (+0 -1122)
📝 docs/mods.md (+3 -3)
📝 tools/test_structure_layout_parity.py (+102 -52)

📄 Description

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

Clean-room: implemented from cleanroom/structures/spec-yungsapi.md §2, §3, §5 and port-pack-interface.md; no mod source read. The legacy files were deleted unread.

Based on #1736. It also merges #1740's branch (the wall) until that lands; this PR's own change is the last commit.

What

Players' packs now carry YUNG's API data as written, and the clean YUNG draws from #1736 lay them out.

  • horizon-port-pack gets its own yung module (src/yung.rs). yungsapi:yung_jigsaw structures and yungsapi:yung_single_element elements pass through unchanged. Fields the spec leaves open are counted by name in the carry report's lost rules: adapt_noise, max_y/min_y, enhanced terrain adaptation, and the elements' condition, modifiers, is_priority, min_required_depth and ignore_bounds.
  • YUNG's other structure, placement and processor types (spider/nether dungeons, mineshafts, temples, enhanced_random_spread, pillars and placeholders) go to the general code: reported unsupported, or dropped and counted, until the spec covers them.
  • Deleted unread: legacy_structure_mods/yung.rs (its mod line removed by text match) and horizon-world's structure/yung.rs.
  • Deleted because nothing writes them any more: the horizon:yungsapi keys, horizon:disables and its test, and the yung field on pool elements. The field's initializer was the only line removed in the test code of enhanced_terrain.rs and piece_limited.rs. Those files are on the excluded list: the line was found from the compiler's error position and removed by text match without opening the file.
  • The layout harness now runs horizon-port-pack carry on the jars in a fresh work folder, then layers the carried files over the 26.3 resources. It tests the path players take.
  • docs/mods.md: the terrain-kernel key is no longer attributed to YUNG.

Result

  • Better Dungeons through the port path: 82 of 84 starts match the oracle piece for piece (2 known: 26.3's sulfur_caves).
  • Vanilla profile: 22 of 31 plus 9 known, unchanged.

What players lose until the spec covers it

Everything the old conversion did beyond the jigsaw draws. In particular, Strongholds, Fortresses and Jungle Temples' terrain adaptation and conditions are not run. YUNG's mods no longer turn their vanilla counterparts off (the spec doesn't describe that yet), so a YUNG stronghold can generate next to a vanilla one. YUNG's processors and its other structure types are dropped or unsupported.

Tests

  • The listed port-pack tests pass. pillars_become_the_games is updated: its two Better Fortresses processors now stay Java, so the later general step drops them.
  • New yung::tests::jigsaws_and_elements_are_carried_as_written.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 486df91b2, 11 min 35 s)

Check Result
Scope ⚠️ 18 files, +710 −2301; 2758 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 257 run, FAILED (errors=2) (42 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 6 s)
tests: horizon-port-pack, horizon-world ✅ 290 passed (3 min 15 s)
doc tests ✅ 0 passed (4 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (2 min 28 s)
launcher tests ✅ 118 passed (2 min 37 s)
Parity ➖ 310 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 298 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The scope line counts #1717, #1736 and #1740 too. This commit alone is +192 −2335. Python: the same 2 macOS-only errors as on main.

Needs Ludovic / the orchestrator

  • Decide whether losing the uncovered YUNG features (above) is acceptable until the spec catches up.
  • docs/modpacks.md still describes the old YUNG conversion in the sections this team may not read (around lines 455–480 and 615–635). I'll rewrite them when the series lands.
  • processor/pillars.rs still implements horizon:yung_pillar and horizon:stair_pillar, but nothing writes them now. The file is on the excluded list, so I haven't touched it.

🤖 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/1746 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/yung-port-as-written` --- ### 📝 Commits (4) - [`066f079`](https://github.com/horizon-rust/horizon/commit/066f07968bab4d557bbfc2c205dea38ee5978d0c) Merge remote-tracking branch 'origin/refactor/port-pack-legacy-structure-mods' into feat/yung-port-as-written - [`379692f`](https://github.com/horizon-rust/horizon/commit/379692f35545e149cc323f48966697b00a24fffa) Port YUNG's worldgen as written; delete the old YUNG conversion and assembler - [`3bc38ce`](https://github.com/horizon-rust/horizon/commit/3bc38cebb4aa90bb791f7e3244cf1c0767b625f8) YUNG jigsaws: the start is not counted, priority, depth and bounds rules run - [`35e047f`](https://github.com/horizon-rust/horizon/commit/35e047fb8ecc581cd71174b300f004a137956772) Merge origin/main into feat/yung-port-as-written ### 📊 Changes **15 files changed** (+336 additions, -2382 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+0 -1) 📝 `crates/horizon-port-pack/src/legacy_structure_mods/mod.rs` (+0 -1) ➖ `crates/horizon-port-pack/src/legacy_structure_mods/yung.rs` (+0 -1055) 📝 `crates/horizon-port-pack/src/lib.rs` (+1 -0) 📝 `crates/horizon-port-pack/src/processors.rs` (+10 -9) 📝 `crates/horizon-port-pack/src/worldgen.rs` (+4 -3) ➕ `crates/horizon-port-pack/src/yung.rs` (+102 -0) 📝 `crates/horizon-world/src/worldgen/structure.rs` (+0 -1) 📝 `crates/horizon-world/src/worldgen/structure/enhanced_terrain.rs` (+0 -1) 📝 `crates/horizon-world/src/worldgen/structure/jigsaw.rs` (+111 -65) 📝 `crates/horizon-world/src/worldgen/structure/piece_limited.rs` (+0 -1) 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+3 -68) ➖ `crates/horizon-world/src/worldgen/structure/yung.rs` (+0 -1122) 📝 `docs/mods.md` (+3 -3) 📝 `tools/test_structure_layout_parity.py` (+102 -52) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean-room: implemented from cleanroom/structures/spec-yungsapi.md §2, §3, §5 and port-pack-interface.md; no mod source read. The legacy files were deleted unread. Based on #1736. It also merges #1740's branch (the wall) until that lands; this PR's own change is the last commit. ## What Players' packs now carry YUNG's API data as written, and the clean YUNG draws from #1736 lay them out. - `horizon-port-pack` gets its own `yung` module (`src/yung.rs`). `yungsapi:yung_jigsaw` structures and `yungsapi:yung_single_element` elements pass through unchanged. Fields the spec leaves open are counted by name in the carry report's lost rules: `adapt_noise`, `max_y`/`min_y`, enhanced terrain adaptation, and the elements' `condition`, `modifiers`, `is_priority`, `min_required_depth` and `ignore_bounds`. - YUNG's other structure, placement and processor types (spider/nether dungeons, mineshafts, temples, `enhanced_random_spread`, pillars and placeholders) go to the general code: reported unsupported, or dropped and counted, until the spec covers them. - Deleted unread: `legacy_structure_mods/yung.rs` (its `mod` line removed by text match) and horizon-world's `structure/yung.rs`. - Deleted because nothing writes them any more: the `horizon:yungsapi` keys, `horizon:disables` and its test, and the `yung` field on pool elements. The field's initializer was the only line removed in the test code of `enhanced_terrain.rs` and `piece_limited.rs`. Those files are on the excluded list: the line was found from the compiler's error position and removed by text match without opening the file. - The layout harness now runs `horizon-port-pack carry` on the jars in a fresh work folder, then layers the carried files over the 26.3 resources. It tests the path players take. - `docs/mods.md`: the terrain-kernel key is no longer attributed to YUNG. ## Result - Better Dungeons through the port path: **82 of 84 starts match the oracle piece for piece** (2 known: 26.3's `sulfur_caves`). - Vanilla profile: 22 of 31 plus 9 known, unchanged. ## What players lose until the spec covers it Everything the old conversion did beyond the jigsaw draws. In particular, Strongholds, Fortresses and Jungle Temples' terrain adaptation and conditions are not run. YUNG's mods no longer turn their vanilla counterparts off (the spec doesn't describe that yet), so a YUNG stronghold can generate next to a vanilla one. YUNG's processors and its other structure types are dropped or unsupported. ## Tests - The listed port-pack tests pass. `pillars_become_the_games` is updated: its two Better Fortresses processors now stay Java, so the later general step drops them. - New `yung::tests::jigsaws_and_elements_are_carried_as_written`. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 486df91b2, 11 min 35 s) | Check | Result | | --- | --- | | Scope | ⚠️ 18 files, +710 −2301; 2758 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 257 run, FAILED (errors=2) (42 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 6 s) | | tests: horizon-port-pack, horizon-world | ✅ 290 passed (3 min 15 s) | | doc tests | ✅ 0 passed (4 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (2 min 28 s) | | launcher tests | ✅ 118 passed (2 min 37 s) | | Parity | ➖ 310 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 298 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The scope line counts #1717, #1736 and #1740 too. This commit alone is +192 −2335. Python: the same 2 macOS-only errors as on main. ## Needs Ludovic / the orchestrator - Decide whether losing the uncovered YUNG features (above) is acceptable until the spec catches up. - `docs/modpacks.md` still describes the old YUNG conversion in the sections this team may not read (around lines 455–480 and 615–635). I'll rewrite them when the series lands. - `processor/pillars.rs` still implements `horizon:yung_pillar` and `horizon:stair_pillar`, but nothing writes them now. The file is on the excluded list, so I haven't touched it. 🤖 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:11:54 +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#3738
No description provided.