[PR #981] [MERGED] Place pillars and fluid fixes that reach outside the template #2961

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

📋 Pull Request Information

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

Base: main ← Head: feat/pillar-processors


📝 Commits (1)

  • ffa46a5 Place pillars and fluid fixes that reach outside the template

📊 Changes

7 files changed (+954 additions, -0 deletions)

View changed files

📝 crates/horizon-world/src/level/feature_world.rs (+9 -0)
📝 crates/horizon-world/src/worldgen/block_feature.rs (+7 -0)
📝 crates/horizon-world/src/worldgen/feature_region.rs (+9 -0)
📝 crates/horizon-world/src/worldgen/generator_decoration.rs (+11 -0)
📝 crates/horizon-world/src/worldgen/placement/context.rs (+11 -0)
📝 crates/horizon-world/src/worldgen/structure/processor.rs (+54 -0)
➕ crates/horizon-world/src/worldgen/structure/processor/pillars.rs (+853 -0)

📄 Description

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

What

The game's side of the mods' Java processors that write blocks outside their template while it is processed (pillars under a structure, walls over fluid sources). Five new processor types in crates/horizon-world/src/worldgen/structure/processor/pillars.rs:

type mod processor it stands for
horizon:pillar Repurposed Structures' and Moog's PillarProcessor: a trigger block starts a column (of the replacement, or Moog's height randomizer) in a direction through blocks that don't occlude (with forced_placement, through all but unbreakable ones), down to the first land, within pillar_length; the nested processor list runs on each block
horizon:bottom_pillar Repurposed's BottomPillarProcessor (the template's bottom layer)
horizon:close_off_fluid_sources Repurposed's and Moog's fluid fix: source blocks next to an open structure block get a weighted replacement (GeneralUtils.getRandomEntry)
horizon:yung_pillar YUNG's PillarProcessor (Better Fortresses, Better Jungle Temples): target block becomes a draw of target_block_output, column of pillar_states (with yungsapi:altitude) through air and fluids
horizon:stair_pillar Better Fortresses' StairPillarProcessor: stair supports

PlacementContext::set_chunk_block is the ProtoChunk.setBlockState the mods call (heightmaps updated, the terrain region's set_block_worldgen); the fluid fix writes the chunk section as theirs does. Like the mods, which check WorldGenRegion.getCenter(), they write only in the chunk being generated (the placement's bounding box is that chunk). Random draws use StructurePlaceSettings.getRandom(pos) (with_random), as theirs. Nested lists are capped at 16 levels.

Why

modpacks-10 brief, task 2: the mods' structures generated without their pillars and with placeholder blocks showing (382 red glass blocks around spawn at seed 1234, Better Fortresses hanging in the air). The carry side is the next PR (it maps the mods' JSON to these types); this one alone changes nothing for vanilla data.

How tested

cargo fmt --all -- --check                                         ok
cargo clippy -p horizon-world --all-targets -- -D warnings          ok
cargo test -p horizon-world                                          ok (all suites)
  pillars::tests: height randomizer shares and ranges, YUNG altitude condition,
  getRandomEntry picks, direction names, Vec3i.closerThan

With the carry PR, on ATM10's 7 structure mods that use them (seed 1234, chunk_dump before/after with this build):

  • Overworld, chunks around spawn: 1,515 blocks change: the 382 red glass placeholders under Repurposed's ocean outpost and pyramids become prismarine, gravel and prismarine pillars reach the sea floor (e.g. column at (-1, 7): air y 16..34 under the outpost becomes gravel, ending on the stone at y 15).
  • Nether, the Better Fortresses fortress at chunk (-23, 9), 180 chunks: 64,568 blocks change; 41,487 air and 2,163 lava blocks under it become nether brick / magma columns, which end on netherrack (472 columns sampled) or nylium (73); the terracotta placeholders become (red) nether bricks; the huge fungi there grow around the columns.
  • Structure starts unchanged: 382 starts, 37,451 pieces (chunks -64..63), so every pool still decodes.

Vanilla structure-start oracle and the game-side parity harnesses: run once on the integration commit of this PR, #969, #975 (results added below when done).

Needs Ludovic

Nothing.

Integration run (game-side PRs together)

One commit merging this PR with #969, #974, #975, #981, #982, #983, #984, #988, #989 on main 0af3dd39:

cargo fmt --all -- --check                                                      ok
cargo clippy --workspace --all-targets -- -D warnings                           ok
cargo test -p horizon-world -p horizon-port-pack -p horizon-mods -p horizon-client   ok (0 failed)
tools/parity.py --changed origin/main                                           301 passed, 0 failed in 207.2 min (mob_ai and command_exec included)
vanilla structure-start oracle, chunks -64..63                                  150/150 (seed 1234), 134/134 (seed 2)

(#969's first CI parity run failed command_exec on /random reset * (11 vs 12 sequences); its rerun passed 780/780, so that was a flake. The rerun's mob_ai failure was its Java oracle crashing under load; mob_ai passes on the integration commit.)

🤖 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/981 **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/pillar-processors` --- ### 📝 Commits (1) - [`ffa46a5`](https://github.com/horizon-rust/horizon/commit/ffa46a50afd5aeacf1ef5d78611c9228a8974958) Place pillars and fluid fixes that reach outside the template ### 📊 Changes **7 files changed** (+954 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/level/feature_world.rs` (+9 -0) 📝 `crates/horizon-world/src/worldgen/block_feature.rs` (+7 -0) 📝 `crates/horizon-world/src/worldgen/feature_region.rs` (+9 -0) 📝 `crates/horizon-world/src/worldgen/generator_decoration.rs` (+11 -0) 📝 `crates/horizon-world/src/worldgen/placement/context.rs` (+11 -0) 📝 `crates/horizon-world/src/worldgen/structure/processor.rs` (+54 -0) ➕ `crates/horizon-world/src/worldgen/structure/processor/pillars.rs` (+853 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The game's side of the mods' Java processors that write blocks **outside** their template while it is processed (pillars under a structure, walls over fluid sources). Five new processor types in `crates/horizon-world/src/worldgen/structure/processor/pillars.rs`: | type | mod processor it stands for | | --- | --- | | `horizon:pillar` | Repurposed Structures' and Moog's `PillarProcessor`: a trigger block starts a column (of the replacement, or Moog's height randomizer) in a direction through blocks that don't occlude (with `forced_placement`, through all but unbreakable ones), down to the first land, within `pillar_length`; the nested processor list runs on each block | | `horizon:bottom_pillar` | Repurposed's `BottomPillarProcessor` (the template's bottom layer) | | `horizon:close_off_fluid_sources` | Repurposed's and Moog's fluid fix: source blocks next to an open structure block get a weighted replacement (`GeneralUtils.getRandomEntry`) | | `horizon:yung_pillar` | YUNG's `PillarProcessor` (Better Fortresses, Better Jungle Temples): target block becomes a draw of `target_block_output`, column of `pillar_states` (with `yungsapi:altitude`) through air and fluids | | `horizon:stair_pillar` | Better Fortresses' `StairPillarProcessor`: stair supports | `PlacementContext::set_chunk_block` is the `ProtoChunk.setBlockState` the mods call (heightmaps updated, the terrain region's `set_block_worldgen`); the fluid fix writes the chunk section as theirs does. Like the mods, which check `WorldGenRegion.getCenter()`, they write only in the chunk being generated (the placement's bounding box is that chunk). Random draws use `StructurePlaceSettings.getRandom(pos)` (`with_random`), as theirs. Nested lists are capped at 16 levels. ## Why modpacks-10 brief, task 2: the mods' structures generated without their pillars and with placeholder blocks showing (382 red glass blocks around spawn at seed 1234, Better Fortresses hanging in the air). The carry side is the next PR (it maps the mods' JSON to these types); this one alone changes nothing for vanilla data. ## How tested ``` cargo fmt --all -- --check ok cargo clippy -p horizon-world --all-targets -- -D warnings ok cargo test -p horizon-world ok (all suites) pillars::tests: height randomizer shares and ranges, YUNG altitude condition, getRandomEntry picks, direction names, Vec3i.closerThan ``` With the carry PR, on ATM10's 7 structure mods that use them (seed 1234, `chunk_dump` before/after with this build): - Overworld, chunks around spawn: 1,515 blocks change: the 382 red glass placeholders under Repurposed's ocean outpost and pyramids become prismarine, gravel and prismarine pillars reach the sea floor (e.g. column at (-1, 7): air y 16..34 under the outpost becomes gravel, ending on the stone at y 15). - Nether, the Better Fortresses fortress at chunk (-23, 9), 180 chunks: 64,568 blocks change; 41,487 air and 2,163 lava blocks under it become nether brick / magma columns, which end on netherrack (472 columns sampled) or nylium (73); the terracotta placeholders become (red) nether bricks; the huge fungi there grow around the columns. - Structure starts unchanged: 382 starts, 37,451 pieces (chunks -64..63), so every pool still decodes. Vanilla structure-start oracle and the game-side parity harnesses: run once on the integration commit of this PR, #969, #975 (results added below when done). ## Needs Ludovic Nothing. ## Integration run (game-side PRs together) One commit merging this PR with #969, #974, #975, #981, #982, #983, #984, #988, #989 on main 0af3dd39: ``` cargo fmt --all -- --check ok cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-world -p horizon-port-pack -p horizon-mods -p horizon-client ok (0 failed) tools/parity.py --changed origin/main 301 passed, 0 failed in 207.2 min (mob_ai and command_exec included) vanilla structure-start oracle, chunks -64..63 150/150 (seed 1234), 134/134 (seed 2) ``` (#969's first CI parity run failed command_exec on `/random reset *` (11 vs 12 sequences); its rerun passed 780/780, so that was a flake. The rerun's mob_ai failure was its Java oracle crashing under load; mob_ai passes on the integration commit.) 🤖 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:27 +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#2961
No description provided.