[PR #2459] [MERGED] Jigsaw structures: vanilla defaults for max distance and padding #4337

Closed
opened 2026-11-03 04:16:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/jigsaw-distance-padding-defaults


📝 Commits (1)

  • 41d8b9e Jigsaw structures: default max distance vertical and padding top like vanilla

📊 Changes

1 file changed (+9 additions, -8 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/structure/start.rs (+9 -8)

📄 Description

What and why

A data pack can give max_distance_from_center as an object without vertical, or dimension_padding with only bottom (or only top). Horizon copied the first value into the missing one. Vanilla defaults a missing vertical to the full world height and a missing padding side to 0.

pair now takes the value to use for the missing second field. Vanilla's own structures are not affected.

Vanilla reference

  • JigsawStructure.MaxDistance.FULL_CODEC: vertical is optional and defaults to DimensionType.Y_SIZE (4064).
  • DimensionPadding.RECORD_CODEC: bottom and top both default to 0.

Self-check

cargo check -p horizon-client passes.


🔄 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/2459 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/jigsaw-distance-padding-defaults` --- ### 📝 Commits (1) - [`41d8b9e`](https://github.com/horizon-rust/horizon/commit/41d8b9e48aa8c5604fb2674ad60c2726de3e6857) Jigsaw structures: default max distance vertical and padding top like vanilla ### 📊 Changes **1 file changed** (+9 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/structure/start.rs` (+9 -8) </details> ### 📄 Description ## What and why A data pack can give `max_distance_from_center` as an object without `vertical`, or `dimension_padding` with only `bottom` (or only `top`). Horizon copied the first value into the missing one. Vanilla defaults a missing `vertical` to the full world height and a missing padding side to 0. `pair` now takes the value to use for the missing second field. Vanilla's own structures are not affected. ## Vanilla reference - `JigsawStructure.MaxDistance.FULL_CODEC`: `vertical` is optional and defaults to `DimensionType.Y_SIZE` (4064). - `DimensionPadding.RECORD_CODEC`: `bottom` and `top` both default to 0. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:26 +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#4337
No description provided.