[PR #1020] [MERGED] Structures: Repurposed Structures' air fix as horizon:close_off_air_sources #2993

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

📋 Pull Request Information

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

Base: main ← Head: feat/close-off-air-sources


📝 Commits (2)

  • 4459ed9 Structures: Repurposed Structures' air fix, as horizon:close_off_air_sources
  • 9adeb68 docs/modpacks.md: Repurposed's air fix is carried

📊 Changes

4 files changed (+119 additions, -22 deletions)

View changed files

📝 crates/horizon-port-pack/src/processors.rs (+9 -1)
📝 crates/horizon-world/src/worldgen/structure/processor.rs (+7 -0)
📝 crates/horizon-world/src/worldgen/structure/processor/pillars.rs (+96 -19)
📝 docs/modpacks.md (+7 -2)

📄 Description

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

What

Repurposed Structures' close_off_air_sources_processor (its 4 ocean mineshaft lists) as the game's horizon:close_off_air_sources, next to the fluid fix in pillars.rs:

  • around each template block holding a fluid, a world block beside it that is air (air, cave air, void air) or a liquid block (water or lava at any level) of another fluid type (flowing and still count as two, Fluid.equals) becomes a block of weighted_list_of_replacement_blocks;
  • only blocks of the chunk being generated act; the six neighbours (Direction.values() order) are written in their sections, the ones in other chunks too, as the mod does; neighbours outside the build height are skipped;
  • with one replacement block it draws nothing from the placement's random (the mod only calls settings.getRandom for a weighted pick, and that random is shared), else GeneralUtils.getRandomEntry as the fluid fix does.

Carry maps the mod's type to it with its fields. The weighted block list decoding is now shared by both fixes.

Why

modpacks-11 brief, step 3: code-only leftovers with a small, data-driven equivalent. This one is the whole processor (no logic left in Java).

How tested

cargo fmt --all -- --check                                          ok
cargo clippy -p horizon-world -p horizon-port-pack --all-targets -- -D warnings   ok
cargo test -p horizon-world -p horizon-port-pack                     ok (processors::tests::pillars_become_the_games covers the mapping)

ATM10's Repurposed Structures re-carried: processors dropped 456 → 452, carried 468 → 472. structure_blocks over the 81 chunks of the ocean mineshaft starting at chunk (-18, -54), seed 1234, with and without the processor in its lists: 1,303 blocks change. 650 air and cave air blocks beside the mineshaft's water become prismarine; 614 template water blocks stay water because the wall is there before the list's "world is air → structure void" rule sees them (the mod's processing order: each block runs the whole list, and the processors write the world as they go). Deterministic (two runs identical).

Parity: tools/parity.py --changed origin/main selects 301 harnesses (horizon-world). They run once on an integration commit of this with my other game-side PRs and the open modpacks-10 ones; results and the vanilla structure-start oracle follow in a comment.

Needs Ludovic

Nothing.

🤖 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/1020 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/close-off-air-sources` --- ### 📝 Commits (2) - [`4459ed9`](https://github.com/horizon-rust/horizon/commit/4459ed9dd5f3639c867a5b5da03c4294f488a856) Structures: Repurposed Structures' air fix, as horizon:close_off_air_sources - [`9adeb68`](https://github.com/horizon-rust/horizon/commit/9adeb682cb1fc09ba011a060a90f1b2d0cc86534) docs/modpacks.md: Repurposed's air fix is carried ### 📊 Changes **4 files changed** (+119 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/processors.rs` (+9 -1) 📝 `crates/horizon-world/src/worldgen/structure/processor.rs` (+7 -0) 📝 `crates/horizon-world/src/worldgen/structure/processor/pillars.rs` (+96 -19) 📝 `docs/modpacks.md` (+7 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Repurposed Structures' `close_off_air_sources_processor` (its 4 ocean mineshaft lists) as the game's `horizon:close_off_air_sources`, next to the fluid fix in `pillars.rs`: - around each template block holding a fluid, a world block beside it that is air (air, cave air, void air) or a liquid block (water or lava at any level) of another fluid type (flowing and still count as two, `Fluid.equals`) becomes a block of `weighted_list_of_replacement_blocks`; - only blocks of the chunk being generated act; the six neighbours (`Direction.values()` order) are written in their sections, the ones in other chunks too, as the mod does; neighbours outside the build height are skipped; - with one replacement block it draws nothing from the placement's random (the mod only calls `settings.getRandom` for a weighted pick, and that random is shared), else `GeneralUtils.getRandomEntry` as the fluid fix does. Carry maps the mod's type to it with its fields. The weighted block list decoding is now shared by both fixes. ## Why modpacks-11 brief, step 3: code-only leftovers with a small, data-driven equivalent. This one is the whole processor (no logic left in Java). ## How tested ``` cargo fmt --all -- --check ok cargo clippy -p horizon-world -p horizon-port-pack --all-targets -- -D warnings ok cargo test -p horizon-world -p horizon-port-pack ok (processors::tests::pillars_become_the_games covers the mapping) ``` ATM10's Repurposed Structures re-carried: processors dropped 456 → 452, carried 468 → 472. `structure_blocks` over the 81 chunks of the ocean mineshaft starting at chunk (-18, -54), seed 1234, with and without the processor in its lists: 1,303 blocks change. 650 air and cave air blocks beside the mineshaft's water become prismarine; 614 template water blocks stay water because the wall is there before the list's "world is air → structure void" rule sees them (the mod's processing order: each block runs the whole list, and the processors write the world as they go). Deterministic (two runs identical). Parity: `tools/parity.py --changed origin/main` selects 301 harnesses (horizon-world). They run once on an integration commit of this with my other game-side PRs and the open modpacks-10 ones; results and the vanilla structure-start oracle follow in a comment. ## Needs Ludovic Nothing. 🤖 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:40 +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#2993
No description provided.