[PR #2949] [MERGED] Use a saved world's preset for new chunks and locate offsets #4703

Closed
opened 2026-11-03 05:07:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2949
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: fix/saved-world-preset


📝 Commits (3)

  • 2607d06 Use a saved world's preset for new chunks
  • afd40fd Add the structure set's locate_offset to /locate
  • 81be26d Accept flat_all_dimensions as a dedicated level-type

📊 Changes

7 files changed (+61 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+2 -1)
📝 crates/horizon-client/src/game/world_loading.rs (+2 -1)
📝 crates/horizon-client/src/save.rs (+24 -0)
📝 crates/horizon-client/src/vanillagen.rs (+18 -6)
📝 crates/horizon-client/src/vanillagen/lod.rs (+1 -1)
📝 crates/horizon-world/src/worldgen/generator_structures.rs (+2 -2)
📝 crates/horizon-world/src/worldgen/structure/start.rs (+12 -0)

📄 Description

What and why

  • A saved amplified, large-biome or single-biome world got normal terrain for every new chunk, because the chunk generator always used minecraft:normal. Horizon now reads the preset from the world's saved overworld generator (noise settings and biome source) and generates with it. Far decoration uses the same preset.
  • /locate now adds the structure set's locate_offset. Buried treasure has [9, 0, 9], so /locate buried_treasure points at the vanilla position inside the chunk instead of its corner.
  • The dedicated server's level-type list accepts minecraft:flat_all_dimensions. That preset still generates normal terrain, and the log says so.
  • Create New World is not touched; open PR #2570 covers the new world types.

Vanilla reference

  • worldgen/world_preset/amplified.json, large_biomes.json, single_biome_surface.json (noise settings and biome source per preset)
  • StructurePlacement.java:20-22 (getLocatePos adds locateOffset), ChunkGenerator.java:332, 338
  • worldgen/structure_set/buried_treasures.json (locate_offset [9, 0, 9])

Self-check

clippy and fmt pass for horizon-client and horizon-world. Not run in game.


🔄 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/2949 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/saved-world-preset` --- ### 📝 Commits (3) - [`2607d06`](https://github.com/horizon-rust/horizon/commit/2607d06f94c3fac0cad5727294d5affbd3e85f92) Use a saved world's preset for new chunks - [`afd40fd`](https://github.com/horizon-rust/horizon/commit/afd40fdbfa4f2838eacfa002f8a3e0b418d23238) Add the structure set's locate_offset to /locate - [`81be26d`](https://github.com/horizon-rust/horizon/commit/81be26d68613e3e3f1a85b8a5574ee945bce747a) Accept flat_all_dimensions as a dedicated level-type ### 📊 Changes **7 files changed** (+61 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+2 -1) 📝 `crates/horizon-client/src/game/world_loading.rs` (+2 -1) 📝 `crates/horizon-client/src/save.rs` (+24 -0) 📝 `crates/horizon-client/src/vanillagen.rs` (+18 -6) 📝 `crates/horizon-client/src/vanillagen/lod.rs` (+1 -1) 📝 `crates/horizon-world/src/worldgen/generator_structures.rs` (+2 -2) 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+12 -0) </details> ### 📄 Description ## What and why - A saved amplified, large-biome or single-biome world got normal terrain for every new chunk, because the chunk generator always used minecraft:normal. Horizon now reads the preset from the world's saved overworld generator (noise settings and biome source) and generates with it. Far decoration uses the same preset. - `/locate` now adds the structure set's `locate_offset`. Buried treasure has [9, 0, 9], so `/locate buried_treasure` points at the vanilla position inside the chunk instead of its corner. - The dedicated server's `level-type` list accepts `minecraft:flat_all_dimensions`. That preset still generates normal terrain, and the log says so. - Create New World is not touched; open PR #2570 covers the new world types. ## Vanilla reference - `worldgen/world_preset/amplified.json`, `large_biomes.json`, `single_biome_surface.json` (noise settings and biome source per preset) - `StructurePlacement.java:20-22` (`getLocatePos` adds `locateOffset`), `ChunkGenerator.java:332, 338` - `worldgen/structure_set/buried_treasures.json` (`locate_offset` [9, 0, 9]) ## Self-check clippy and fmt pass for horizon-client and horizon-world. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:18 +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#4703
No description provided.