[PR #983] [MERGED] Flood and waterlog the structures built under the sea #2962

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/983
Author: @ludovic111
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @ludovic111

Base: main ← Head: feat/sea-level-processors


📝 Commits (1)

  • 303aa35 Flood and waterlog the structures built under the sea

📊 Changes

3 files changed (+361 additions, -4 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/structure/processor.rs (+79 -1)
📝 crates/horizon-world/src/worldgen/structure/processor/pillars.rs (+15 -3)
➕ crates/horizon-world/src/worldgen/structure/processor/sea_level.rs (+267 -0)

📄 Description

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

Stacked on #981 (base feat/pillar-processors; retarget to main once #981 merges).

What

The game's side of Better Ocean Monuments' Java processors, which are what keep its monuments under water (crates/horizon-world/src/worldgen/structure/processor/sea_level.rs):

type the mod's processor
horizon:flood_air AirProcessor: the template's minecraft:air (not cave air) below sea level becomes water, no block entity
horizon:waterlog WaterlogProcessor: below sea level, a state with waterlogged gets true; template water/lava on the edge of the chunk being generated (x % 16 or z % 16 is 0 or 15, Java's signed remainder) is marked for postprocessing
horizon:keep_world_block StructureVoidProcessor: blocks take the world's block (the next processors see it, unlike vanilla's structure void)

Plus two options:

  • horizon:pick redraw: each chance draws its own nextFloat (if (r.nextFloat() < 0.1) … else if (r.nextFloat() < 0.3), its copper, slab and sponge processors), and keep_properties (Block.withPropertiesOf, for the copper stairs and slabs);
  • horizon:yung_pillar keep_properties, for Better Witch Huts' fence legs (OAK_FENCE.withPropertiesOf).

Why

The monuments' templates are 81% air (start.nbt: 494,418 of 607,824 blocks). With the air processor dropped, every Better Ocean Monument stood in a dry bubble under the sea (in the monument at chunk (2, 8), seed 1234, 227,034 air blocks between y 30 and 60). Found while checking #981's pillars, which run through that bubble. Better Ocean Monuments isn't one of the brief's mods, but its leg processor is the same kind of "places outside the template" processor as the brief's, and the dry monument is visible straight away.

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)
  sea_level::tests: air floods below the sea only (cave air stays), waterlog + edge marks
  (x = -16 and z = 15 marked, x = -1 not), kept blocks take the world's (outside the chunk: unchanged)
  processor::tests::redrawn_picks_draw_a_float_each

With the carry PR (#984), ATM10's 42 mods, seed 1234, chunk_dump of the 64 chunks around the monument at chunk (2, 8):

  • 318,512 air blocks become water; no air left between y 30 and 60 (227,034 before);
  • all 5,142 placeholder blocks are gone (blue glass → prismarine-brick legs down to the sea floor, lime/blue concrete → waterlogged slabs, slabs → seagrass and tall seagrass, orange glass → wet sponge, brown wool → the world's block); the copper ages (674 weathered and 234 exposed cut copper stairs among 1,533 oxidized);
  • structure starts unchanged: 382 starts, 37,451 pieces (chunks -64..63).

Vanilla structure-start oracle and the game-side harnesses: on the integration commit with #969, #975, #981 (results added 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/983 **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/sea-level-processors` --- ### 📝 Commits (1) - [`303aa35`](https://github.com/horizon-rust/horizon/commit/303aa35a6f5055581ad01f47b7c422d2f68a08de) Flood and waterlog the structures built under the sea ### 📊 Changes **3 files changed** (+361 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/structure/processor.rs` (+79 -1) 📝 `crates/horizon-world/src/worldgen/structure/processor/pillars.rs` (+15 -3) ➕ `crates/horizon-world/src/worldgen/structure/processor/sea_level.rs` (+267 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Stacked on #981** (base `feat/pillar-processors`; retarget to main once #981 merges). ## What The game's side of Better Ocean Monuments' Java processors, which are what keep its monuments under water (`crates/horizon-world/src/worldgen/structure/processor/sea_level.rs`): | type | the mod's processor | | --- | --- | | `horizon:flood_air` | AirProcessor: the template's `minecraft:air` (not cave air) below sea level becomes water, no block entity | | `horizon:waterlog` | WaterlogProcessor: below sea level, a state with `waterlogged` gets `true`; template water/lava on the edge of the chunk being generated (`x % 16` or `z % 16` is 0 or 15, Java's signed remainder) is marked for postprocessing | | `horizon:keep_world_block` | StructureVoidProcessor: `blocks` take the world's block (the next processors see it, unlike vanilla's structure void) | Plus two options: - `horizon:pick` `redraw`: each chance draws its own `nextFloat` (`if (r.nextFloat() < 0.1) … else if (r.nextFloat() < 0.3)`, its copper, slab and sponge processors), and `keep_properties` (Block.withPropertiesOf, for the copper stairs and slabs); - `horizon:yung_pillar` `keep_properties`, for Better Witch Huts' fence legs (`OAK_FENCE.withPropertiesOf`). ## Why The monuments' templates are 81% air (`start.nbt`: 494,418 of 607,824 blocks). With the air processor dropped, every Better Ocean Monument stood in a dry bubble under the sea (in the monument at chunk (2, 8), seed 1234, 227,034 air blocks between y 30 and 60). Found while checking #981's pillars, which run through that bubble. Better Ocean Monuments isn't one of the brief's mods, but its leg processor is the same kind of "places outside the template" processor as the brief's, and the dry monument is visible straight away. ## 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) sea_level::tests: air floods below the sea only (cave air stays), waterlog + edge marks (x = -16 and z = 15 marked, x = -1 not), kept blocks take the world's (outside the chunk: unchanged) processor::tests::redrawn_picks_draw_a_float_each ``` With the carry PR (#984), ATM10's 42 mods, seed 1234, `chunk_dump` of the 64 chunks around the monument at chunk (2, 8): - 318,512 air blocks become water; no air left between y 30 and 60 (227,034 before); - all 5,142 placeholder blocks are gone (blue glass → prismarine-brick legs down to the sea floor, lime/blue concrete → waterlogged slabs, slabs → seagrass and tall seagrass, orange glass → wet sponge, brown wool → the world's block); the copper ages (674 weathered and 234 exposed cut copper stairs among 1,533 oxidized); - structure starts unchanged: 382 starts, 37,451 pieces (chunks -64..63). Vanilla structure-start oracle and the game-side harnesses: on the integration commit with #969, #975, #981 (results added 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#2962
No description provided.