[PR #930] [MERGED] Structures: Better Dungeons' small dungeons keep one or two chests #2923

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

📋 Pull Request Information

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

Base: main ← Head: feat/yung-chest-cap


📝 Commits (6)

  • 96822cd Moog's trial spawners and vaults: the saved state out, the configs in
  • c798597 Better Desert Temples' placeholder blocks: suspicious sand, sherds, swaps
  • 50215b4 Better Dungeons' small dungeons: one or two chests, as the mod caps them
  • 03c423d Merge origin/main into feat/carry-trial-spawners-vaults
  • c3595f1 Merge feat/carry-trial-spawners-vaults (with main) into feat/yung-placeholder-blocks
  • 63044f3 Merge feat/yung-placeholder-blocks (with main) into feat/yung-chest-cap

📊 Changes

4 files changed (+854 additions, -7 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+10 -0)
📝 crates/horizon-port-pack/src/processors.rs (+394 -0)
📝 crates/horizon-world/src/worldgen/structure/processor.rs (+434 -4)
📝 docs/modpacks.md (+16 -3)

📄 Description

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

Stacked on #929 (base feat/yung-placeholder-blocks, itself on #926). Merge those first.

What

Better Dungeons' small dungeon templates hold several chests. The mod's Java chest processor keeps the first one, then keeps each other one on nextFloat() <= 0.2 until two have stayed, and turns the rest into cave air. The carry dropped it, so every chest stayed.

  • Game: horizon:count_cap. Of the blocks a placement meets, the first min stay, then each stays on settings.getRandom(pos).nextFloat() <= chance until max have, and the others become replacement. It is counted per placement: a counter in PlaceSettings, reset in process_infos. That matches the mod's DungeonContext, which is set up in each StructureTemplate.placeInWorld, so one chunk of the piece. Test: count_caps_keep_the_first_then_some.
  • Carry: betterdungeons:small_dungeon_chest_processor becomes it with the mod's config defaults (at least 1, at most 2, chance 0.2; chest and trapped chest, which is what instanceof ChestBlock covers in 1.21.1). Test: small_dungeon_chests_are_capped.

Measured (All the Mods 10, seed 1234, five small dungeons placed with block entities)

Small dungeon (chunk) chests before after
(-60, 12) 3 1
(-60, 30) 2 2
(-60, 43) 2 1
(-59, -19) 2 1
(-59, 2) 3 1

Processors carried 133 -> 136, dropped 1,294 -> 1,291.

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 (40), cargo test -p horizon-world --lib structure::processor (7): pass
  • Vanilla data never names horizon:count_cap, and the counter changes nothing else.

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/930 **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-chest-cap` --- ### 📝 Commits (6) - [`96822cd`](https://github.com/horizon-rust/horizon/commit/96822cd5f86063afe759f80c22e0cc66df74150c) Moog's trial spawners and vaults: the saved state out, the configs in - [`c798597`](https://github.com/horizon-rust/horizon/commit/c7985974e79af41a9f827f44c99d5d463c0d9b09) Better Desert Temples' placeholder blocks: suspicious sand, sherds, swaps - [`50215b4`](https://github.com/horizon-rust/horizon/commit/50215b484ac0d53e524fd3ece0a27f810f262995) Better Dungeons' small dungeons: one or two chests, as the mod caps them - [`03c423d`](https://github.com/horizon-rust/horizon/commit/03c423daacc4494d5b24a4bb8689637e820a28e9) Merge origin/main into feat/carry-trial-spawners-vaults - [`c3595f1`](https://github.com/horizon-rust/horizon/commit/c3595f1a9c38dc1d1dadf91c1c94fc22360f4735) Merge feat/carry-trial-spawners-vaults (with main) into feat/yung-placeholder-blocks - [`63044f3`](https://github.com/horizon-rust/horizon/commit/63044f339c3564664376d0a2d4dc712395a43459) Merge feat/yung-placeholder-blocks (with main) into feat/yung-chest-cap ### 📊 Changes **4 files changed** (+854 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+10 -0) 📝 `crates/horizon-port-pack/src/processors.rs` (+394 -0) 📝 `crates/horizon-world/src/worldgen/structure/processor.rs` (+434 -4) 📝 `docs/modpacks.md` (+16 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Stacked on #929** (base `feat/yung-placeholder-blocks`, itself on #926). Merge those first. ## What Better Dungeons' small dungeon templates hold several chests. The mod's Java chest processor keeps the first one, then keeps each other one on `nextFloat() <= 0.2` until two have stayed, and turns the rest into cave air. The carry dropped it, so every chest stayed. - **Game:** `horizon:count_cap`. Of the `blocks` a placement meets, the first `min` stay, then each stays on `settings.getRandom(pos).nextFloat() <= chance` until `max` have, and the others become `replacement`. It is counted per placement: a counter in `PlaceSettings`, reset in `process_infos`. That matches the mod's DungeonContext, which is set up in each `StructureTemplate.placeInWorld`, so one chunk of the piece. Test: `count_caps_keep_the_first_then_some`. - **Carry:** `betterdungeons:small_dungeon_chest_processor` becomes it with the mod's config defaults (at least 1, at most 2, chance 0.2; chest and trapped chest, which is what `instanceof ChestBlock` covers in 1.21.1). Test: `small_dungeon_chests_are_capped`. ## Measured (All the Mods 10, seed 1234, five small dungeons placed with block entities) | Small dungeon (chunk) | chests before | after | |---|---|---| | (-60, 12) | 3 | 1 | | (-60, 30) | 2 | 2 | | (-60, 43) | 2 | 1 | | (-59, -19) | 2 | 1 | | (-59, 2) | 3 | 1 | Processors carried 133 -> 136, dropped 1,294 -> 1,291. ## 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` (40), `cargo test -p horizon-world --lib structure::processor` (7): pass - Vanilla data never names `horizon:count_cap`, and the counter changes nothing else. 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:09 +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#2923
No description provided.