[PR #846] [MERGED] Structures: YUNG's placements, and the vanilla structures its mods turn off #2855

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

📋 Pull Request Information

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

Base: main ← Head: feat/yung-placements


📝 Commits (1)

  • c7c9725 Structures: YUNG's placements and their vanilla counterparts turned off

📊 Changes

1 file changed (+243 additions, -0 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/structure/start.rs (+243 -0)

📄 Description

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

The carry side, which writes these keys from YUNG's mods, is the next PR. Vanilla data never holds them, so vanilla worlds don't change.

What

Three keys a carried structure mod's data can hold:

  • "horizon:ring_sections" on a random spread (YUNG's Better Strongholds, BetterStrongholdsPlacement.isPlacementChunk). The world is cut into rings thickness chunks wide, the first starting distance_to_first_ring chunks out. A start is placed only in the odd rings, and in none past max_section. The distance is computed with Java's int math, so the squares wrap the same way past 46,340 chunks.
  • "horizon:avoid_biomes" (Better Desert Temples' and Better Jungle Temples' placements). No start when one of the listed biomes or tags is found around the chunk's middle block at height y. The search is BiomeSource.findBiomeHorizontal with radius blocks and step quarts, closest first. It is checked where the starts are made, where the biome source is at hand, so another set's exclusion zone that names this set doesn't see it. No carried set names one.
  • "horizon:disables" on a structure: every structure of the listed types fails to start. This is what YUNG's DisableVanilla*Mixin does to ChunkGenerator.tryGenerateStructure. In a set of several structures the next one is tried, as in vanilla: with Better Fortresses, the Nether complexes' fortress chunks give a bastion where one fits. The placement itself is untouched, so exclusion zones still see the vanilla set.

Measured (ATM10 8.3's carried mods, seed 1234, chunkgen_bench --starts, with #832 #833 #838 #839 #840 and the carry PR)

  • Overworld, chunks -64..63: vanilla monuments 3 → 0 (Better Ocean Monuments has 3). All starts 365 → 362.
  • Overworld, chunks -256..255: Better Strongholds 0 → 10 starts (7,642 pieces), vanilla strongholds 4 → 0. Better Jungle Temples 0 → 5, vanilla jungle pyramids 3 → 0. Vanilla monuments 18 → 0, swamp huts 6 → 0 (Better Witch Huts has 11). No desert in this square, before or after.
  • Nether, chunks -64..63: Better Fortresses 7 starts. Vanilla fortresses 11 → 0, bastions 10 → 14.
  • Vanilla's mineshafts stay: Better Mineshafts is a Java structure type, so carry does not turn them off.

Self-check

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test -p horizon-world --lib -- structure: passed. New: ring_sections_keep_the_odd_rings (ring edges, max_section, the Java int wrap), avoid_biomes_samples_around_the_middle_block (the 13×13 samples from the middle quart, a hit on the edge), a_structure_turns_its_vanilla_counterpart_off.
  • Vanilla structure-start oracle (seed 1234, chunks -24..23): 35 of 35 match.
  • Parity: all 304 harnesses that depend on the changed files pass on one integration of this agent's PRs (#832, #833, #838, #839, #840, #846, #847, #850, #851 merged onto origin/main at 845a122f): 298 run (298 passed, 0 failed in 82.4 min), 6 already passing for the same inputs. The vanilla structure-start oracle stays at 35/35.

Nothing needs Ludovic. The mod jars and their decompiled reference stayed in a local work folder.

🤖 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/846 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/yung-placements` --- ### 📝 Commits (1) - [`c7c9725`](https://github.com/horizon-rust/horizon/commit/c7c97259420125dab174b8efb966628afb054f90) Structures: YUNG's placements and their vanilla counterparts turned off ### 📊 Changes **1 file changed** (+243 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+243 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The carry side, which writes these keys from YUNG's mods, is the next PR. Vanilla data never holds them, so vanilla worlds don't change. ## What Three keys a carried structure mod's data can hold: - **`"horizon:ring_sections"`** on a random spread (YUNG's Better Strongholds, `BetterStrongholdsPlacement.isPlacementChunk`). The world is cut into rings `thickness` chunks wide, the first starting `distance_to_first_ring` chunks out. A start is placed only in the odd rings, and in none past `max_section`. The distance is computed with Java's int math, so the squares wrap the same way past 46,340 chunks. - **`"horizon:avoid_biomes"`** (Better Desert Temples' and Better Jungle Temples' placements). No start when one of the listed biomes or tags is found around the chunk's middle block at height `y`. The search is `BiomeSource.findBiomeHorizontal` with `radius` blocks and `step` quarts, closest first. It is checked where the starts are made, where the biome source is at hand, so another set's exclusion zone that names this set doesn't see it. No carried set names one. - **`"horizon:disables"`** on a structure: every structure of the listed types fails to start. This is what YUNG's `DisableVanilla*Mixin` does to `ChunkGenerator.tryGenerateStructure`. In a set of several structures the next one is tried, as in vanilla: with Better Fortresses, the Nether complexes' fortress chunks give a bastion where one fits. The placement itself is untouched, so exclusion zones still see the vanilla set. ## Measured (ATM10 8.3's carried mods, seed 1234, `chunkgen_bench --starts`, with #832 #833 #838 #839 #840 and the carry PR) - Overworld, chunks -64..63: vanilla monuments 3 → 0 (Better Ocean Monuments has 3). All starts 365 → 362. - Overworld, chunks -256..255: Better Strongholds 0 → 10 starts (7,642 pieces), vanilla strongholds 4 → 0. Better Jungle Temples 0 → 5, vanilla jungle pyramids 3 → 0. Vanilla monuments 18 → 0, swamp huts 6 → 0 (Better Witch Huts has 11). No desert in this square, before or after. - Nether, chunks -64..63: Better Fortresses 7 starts. Vanilla fortresses 11 → 0, bastions 10 → 14. - Vanilla's mineshafts stay: Better Mineshafts is a Java structure type, so carry does not turn them off. ## Self-check - `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`: clean - `cargo test -p horizon-world --lib -- structure`: passed. New: `ring_sections_keep_the_odd_rings` (ring edges, `max_section`, the Java int wrap), `avoid_biomes_samples_around_the_middle_block` (the 13×13 samples from the middle quart, a hit on the edge), `a_structure_turns_its_vanilla_counterpart_off`. - Vanilla structure-start oracle (seed 1234, chunks -24..23): 35 of 35 match. - Parity: all 304 harnesses that depend on the changed files pass on one integration of this agent's PRs (#832, #833, #838, #839, #840, #846, #847, #850, #851 merged onto origin/main at 845a122f): 298 run (298 passed, 0 failed in 82.4 min), 6 already passing for the same inputs. The vanilla structure-start oracle stays at 35/35. Nothing needs Ludovic. The mod jars and their decompiled reference stayed in a local work folder. 🤖 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:36 +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#2855
No description provided.