[PR #767] [MERGED] Worlds without structures generate none #2794

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

📋 Pull Request Information

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

Base: main ← Head: fix/generate-structures-false


📝 Commits (1)

  • a1af7fd Worlds without structures generate none

📊 Changes

4 files changed (+69 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+4 -1)
📝 crates/horizon-client/src/vanillagen.rs (+14 -1)
📝 crates/horizon-world/src/worldgen/generator.rs (+12 -0)
📝 tools/test_server_world_gen_parity.py (+39 -3)

📄 Description

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

What

Worlds without structures now generate none. generate-structures=false in server.properties (stored by #733) and the world screen's Generate Structures are written to the world's settings, but the generator ignored them.

VanillaTerrain now builds its generator from the world's generate_structures, through the new OverworldGenerator::for_world. Without structures:

  • no structure starts, terrain adaptation or structure pieces (ChunkStatusTasks.generateStructureStarts);
  • locate structure and eyes of ender find nothing (ChunkGenerator.findNearestMapStructure).

Features are unaffected, as in vanilla.

Why

server-host-5, item 2: a server owner who turns structures off should get a world without villages, mineshafts or strongholds, as on vanilla.

How tested

tools/test_server_world_gen_parity.py, case normal (generate-structures=false, seed abc): after Done, the console also asks locate structure #minecraft:village and locate structure minecraft:mineshaft. The harness then counts the saved chunks that hold structure starts or references.

village mineshaft chunks with starts / references
vanilla Could not find a structure of type "#minecraft:village" nearby Could not find… 0 / 0
Horizon before The nearest #minecraft:village (village_taiga) is at [256, ~, -464] The nearest mineshaft is at [112, ~, -96] 0 / 0
Horizon after Could not find… (identical) Could not find… (identical) 0 / 0
cargo fmt --all --check                                             ok
cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings   ok
tools/test_server_world_gen_parity.py                               5 cases, 260 lines identical
tools/parity.py --changed origin/main                               running; results 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/767 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/generate-structures-false` --- ### 📝 Commits (1) - [`a1af7fd`](https://github.com/horizon-rust/horizon/commit/a1af7fdad593d26821cc15a147f7a7e2defa37df) Worlds without structures generate none ### 📊 Changes **4 files changed** (+69 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+4 -1) 📝 `crates/horizon-client/src/vanillagen.rs` (+14 -1) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+12 -0) 📝 `tools/test_server_world_gen_parity.py` (+39 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Worlds without structures now generate none. `generate-structures=false` in server.properties (stored by #733) and the world screen's Generate Structures are written to the world's settings, but the generator ignored them. `VanillaTerrain` now builds its generator from the world's `generate_structures`, through the new `OverworldGenerator::for_world`. Without structures: - no structure starts, terrain adaptation or structure pieces (`ChunkStatusTasks.generateStructureStarts`); - `locate structure` and eyes of ender find nothing (`ChunkGenerator.findNearestMapStructure`). Features are unaffected, as in vanilla. ## Why server-host-5, item 2: a server owner who turns structures off should get a world without villages, mineshafts or strongholds, as on vanilla. ## How tested `tools/test_server_world_gen_parity.py`, case `normal` (`generate-structures=false`, seed `abc`): after `Done`, the console also asks `locate structure #minecraft:village` and `locate structure minecraft:mineshaft`. The harness then counts the saved chunks that hold structure starts or references. | | village | mineshaft | chunks with starts / references | |---|---|---|---| | vanilla | Could not find a structure of type "#minecraft:village" nearby | Could not find… | 0 / 0 | | Horizon before | The nearest #minecraft:village (village_taiga) is at [256, ~, -464] | The nearest mineshaft is at [112, ~, -96] | 0 / 0 | | Horizon after | Could not find… (identical) | Could not find… (identical) | 0 / 0 | ``` cargo fmt --all --check ok cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings ok tools/test_server_world_gen_parity.py 5 cases, 260 lines identical tools/parity.py --changed origin/main running; results 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 15:59: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#2794
No description provided.