[PR #922] [MERGED] Structures: Repurposed Structures' mineshafts, laid out under the terrain #2917

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

📋 Pull Request Information

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

Base: main ← Head: feat/repurposed-mineshafts


📝 Commits (1)

  • 82c8de2 Repurposed's mineshafts: laid out under the terrain, carried as jigsaws

📊 Changes

2 files changed (+96 additions, -2 deletions)

View changed files

📝 crates/horizon-port-pack/src/worldgen.rs (+20 -1)
📝 crates/horizon-world/src/worldgen/structure/piece_limited.rs (+76 -1)

📄 Description

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

What

Repurposed Structures' 10 overworld mineshafts (birch, desert, icy, jungle, ocean, savanna, stone, swamp, taiga, ...) are its generic jigsaw with one change (MineshaftStructure.postLayoutAdjustments): the layout is not centred on the chunk. Its top goes 15 blocks under the lowest ocean floor found at the chunk's middle and 16 blocks to each side (taking one off after each side, as the mod does), never up, and stays within y_allowance.

  • Game: "layout": "mineshaft" in horizon:piece_limited runs that step. Test: mineshafts_go_under_the_lowest_floor_around.
  • Carry: repurposed_structures:generic_mineshaft becomes minecraft:jigsaw with the piece-limited layout and that key, like its generic jigsaw.

Measured (All the Mods 10's carried mods, seed 1234, chunks -64..63, with #919 and #920)

before after
Overworld starts 362 375 (+13 Repurposed mineshafts: ocean 8, icy 2, birch, stone, taiga)
Overworld pieces 22,231 37,375

Vanilla mineshafts still generate next to them: Repurposed turns them off in its Java config, which the carry does not read.

Stacking

Independent of #919 and #920 in code, but its pieces' processors use Repurposed's rule tests, so the mineshafts only load once both are in. Any merge order works.

Self-check

  • cargo fmt --check: clean
  • cargo clippy -p horizon-world -p horizon-port-pack --all-targets -- -D warnings: clean
  • cargo test -p horizon-port-pack (36), cargo test -p horizon-world --lib piece_limited (4): pass
  • Vanilla data never names the layout, so vanilla structures are unchanged (oracle 35/35 on the integration build). The full --changed parity set runs once on the integration of this agent's game-side PRs; the result goes in a comment.

Nothing here needs Ludovic. Mod jars, decompiled code and carried data stay local.

🤖 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/922 **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/repurposed-mineshafts` --- ### 📝 Commits (1) - [`82c8de2`](https://github.com/horizon-rust/horizon/commit/82c8de262f3d10f16c0126c78f55a986f59b1428) Repurposed's mineshafts: laid out under the terrain, carried as jigsaws ### 📊 Changes **2 files changed** (+96 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/worldgen.rs` (+20 -1) 📝 `crates/horizon-world/src/worldgen/structure/piece_limited.rs` (+76 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Repurposed Structures' 10 overworld mineshafts (birch, desert, icy, jungle, ocean, savanna, stone, swamp, taiga, ...) are its generic jigsaw with one change (`MineshaftStructure.postLayoutAdjustments`): the layout is not centred on the chunk. Its top goes 15 blocks under the lowest ocean floor found at the chunk's middle and 16 blocks to each side (taking one off after each side, as the mod does), never up, and stays within `y_allowance`. - **Game:** `"layout": "mineshaft"` in `horizon:piece_limited` runs that step. Test: `mineshafts_go_under_the_lowest_floor_around`. - **Carry:** `repurposed_structures:generic_mineshaft` becomes `minecraft:jigsaw` with the piece-limited layout and that key, like its generic jigsaw. ## Measured (All the Mods 10's carried mods, seed 1234, chunks -64..63, with #919 and #920) | | before | after | |---|---|---| | Overworld starts | 362 | 375 (+13 Repurposed mineshafts: ocean 8, icy 2, birch, stone, taiga) | | Overworld pieces | 22,231 | 37,375 | Vanilla mineshafts still generate next to them: Repurposed turns them off in its Java config, which the carry does not read. ## Stacking Independent of #919 and #920 in code, but its pieces' processors use Repurposed's rule tests, so the mineshafts only load once both are in. Any merge order works. ## Self-check - `cargo fmt --check`: clean - `cargo clippy -p horizon-world -p horizon-port-pack --all-targets -- -D warnings`: clean - `cargo test -p horizon-port-pack` (36), `cargo test -p horizon-world --lib piece_limited` (4): pass - Vanilla data never names the layout, so vanilla structures are unchanged (oracle 35/35 on the integration build). The full `--changed` parity set runs once on the integration of this agent's game-side PRs; the result goes in a comment. Nothing here needs Ludovic. Mod jars, decompiled code and carried data stay local. 🤖 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:06 +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#2917
No description provided.