[PR #4144] [MERGED] Far terrain: kelp is water, and powder snow and paths are kept #5440

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4144
Author: @Fauxvale
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/far-watery-and-nearly-full


📝 Commits (1)

  • edefd8e Far terrain: kelp is water, and powder snow and paths are kept

📊 Changes

1 file changed (+109 additions, -10 deletions)

View changed files

📝 crates/horizon-client-render/src/lod.rs (+109 -10)

📄 Description

🤖 Opened by Fauxvale's AI agent (Claude Code, Opus 5.5), not by Fauxvale personally.

What and why

Fixes #4143.

Far terrain built from loaded chunks (lod::summarize) skipped every block that neither draws solid nor collides as a full block (state_kinds):

  • Kelp and seagrass reaching the surface left holes in the far sea. The column had no water above them, so you could see down to the floor. Waterlogged non-full blocks and bubble columns did the same.
  • Powder snow left holes in snowy slopes. Dirt paths, farmland and stairs drew as dips one block deep.

Changes, all in crates/horizon-client-render/src/lod.rs:

  • state_kinds marks a block that holds water and isn't otherwise kept as WATERY. Column::from_chunk draws it as the water source state, so the water is one span again, and #3850's open-water lighting applies to it.
  • nearly_full keeps powder snow, dirt paths, farmland, honey blocks and stairs, next to chorus.
  • state_kinds is still built once per worker, and summarizing adds one branch per kept block.

The seed's far columns were already right. This only changes chunks the player has loaded (lod::summarize). Far tiles drawn from saved chunks go through another builder, columns in crates/horizon-client/src/vanillagen/lod.rs. It keeps kelp as kelp, so a kelp patch can still look different where that builder draws it. This PR doesn't change it; it could be a follow-up.

This is not #3025. That issue is the seam where near terrain meets far terrain; here the far terrain itself had holes.

Tests:

  • nearly_full_blocks_are_kept.
  • kelp_to_the_surface_is_drawn_as_water: kinds made by hand; a kelp column summarizes exactly like the plain sea next to it.
  • real_mesh_clips_near_chunks_and_preserves_water_and_edited_surfaces (ignored, needs HORIZON_TEST_RESOURCES) now also checks the real block facts. Kelp to the surface becomes water over its floor, powder snow is the surface, and a waterlogged oak stair stays a stair. It passes locally with prepared 26.3 resources.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Horizon-only: far terrain has no vanilla counterpart.

Self-check

pr_ready (tools/pr_ready.py --quick on faux-cachy-lenovo, against origin/main at d3338640b, 1 min 35 s)

Check Result
Scope ✅ 1 files, +109 −10
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 475 passed (46 s)
rustfmt ✅ (9 s)
clippy ❌ failed (21 s)
tests: horizon-client-render ✅ 569 passed (16 s)
doc tests ✅ 0 passed (4 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Clippy fails locally only on lints in files this PR doesn't touch (horizon-world datafix/schema.rs and worldgen/aquifer/noise_based.rs), which my local Rust 1.95 raises; CI uses current stable. cargo clippy -p horizon-client-render --all-targets --no-deps -- -D warnings is clean apart from the same pre-existing manual_range_contains lint in camera.rs.

Screenshots

The same world (seed 12345, render distance 6, LOD distance 64) is built with the same commands before and after: /fill puts a 48×48 kelp forest up to the sea surface and replaces a snowy slope's snow blocks with powder snow. The camera is then moved past the render distance, so both patches draw as far terrain. "Before" is origin/main's lod.rs in the same build.

Powder snow on a slope: a pit of dirt and stone before, snow after. The before/after image is in the first comment.

For kelp, which builder draws a tile (summaries of loaded chunks, or saved chunks) varies from run to run, so I didn't get a repeatable kelp pair. The unit tests cover it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012gFJzABp1uePB4gm32PuaC


🔄 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/4144 **Author:** [@Fauxvale](https://github.com/Fauxvale) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/far-watery-and-nearly-full` --- ### 📝 Commits (1) - [`edefd8e`](https://github.com/horizon-rust/horizon/commit/edefd8ef0c06a06da2f784186f4fdcd15225d84e) Far terrain: kelp is water, and powder snow and paths are kept ### 📊 Changes **1 file changed** (+109 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lod.rs` (+109 -10) </details> ### 📄 Description > 🤖 Opened by Fauxvale's AI agent (Claude Code, Opus 5.5), not by Fauxvale personally. ## What and why Fixes #4143. Far terrain built from loaded chunks (`lod::summarize`) skipped every block that neither draws solid nor collides as a full block (`state_kinds`): - **Kelp and seagrass reaching the surface left holes in the far sea.** The column had no water above them, so you could see down to the floor. Waterlogged non-full blocks and bubble columns did the same. - **Powder snow left holes in snowy slopes.** Dirt paths, farmland and stairs drew as dips one block deep. Changes, all in `crates/horizon-client-render/src/lod.rs`: - `state_kinds` marks a block that holds water and isn't otherwise kept as `WATERY`. `Column::from_chunk` draws it as the water source state, so the water is one span again, and #3850's open-water lighting applies to it. - `nearly_full` keeps powder snow, dirt paths, farmland, honey blocks and stairs, next to chorus. - `state_kinds` is still built once per worker, and summarizing adds one branch per kept block. The seed's far columns were already right. This only changes chunks the player has loaded (`lod::summarize`). Far tiles drawn from saved chunks go through another builder, `columns` in `crates/horizon-client/src/vanillagen/lod.rs`. It keeps kelp as kelp, so a kelp patch can still look different where that builder draws it. This PR doesn't change it; it could be a follow-up. This is not #3025. That issue is the seam where near terrain meets far terrain; here the far terrain itself had holes. Tests: - `nearly_full_blocks_are_kept`. - `kelp_to_the_surface_is_drawn_as_water`: kinds made by hand; a kelp column summarizes exactly like the plain sea next to it. - `real_mesh_clips_near_chunks_and_preserves_water_and_edited_surfaces` (ignored, needs `HORIZON_TEST_RESOURCES`) now also checks the real block facts. Kelp to the surface becomes water over its floor, powder snow is the surface, and a waterlogged oak stair stays a stair. It passes locally with prepared 26.3 resources. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [x] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Horizon-only: far terrain has no vanilla counterpart. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on faux-cachy-lenovo, against origin/main at d3338640b, 1 min 35 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +109 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 475 passed (46 s) | | rustfmt | ✅ (9 s) | | clippy | ❌ failed (21 s) | | tests: horizon-client-render | ✅ 569 passed (16 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Clippy fails locally only on lints in files this PR doesn't touch (`horizon-world` `datafix/schema.rs` and `worldgen/aquifer/noise_based.rs`), which my local Rust 1.95 raises; CI uses current stable. `cargo clippy -p horizon-client-render --all-targets --no-deps -- -D warnings` is clean apart from the same pre-existing `manual_range_contains` lint in `camera.rs`. ## Screenshots The same world (seed 12345, render distance 6, LOD distance 64) is built with the same commands before and after: `/fill` puts a 48×48 kelp forest up to the sea surface and replaces a snowy slope's snow blocks with powder snow. The camera is then moved past the render distance, so both patches draw as far terrain. "Before" is `origin/main`'s `lod.rs` in the same build. Powder snow on a slope: a pit of dirt and stone before, snow after. The before/after image is in the first comment. For kelp, which builder draws a tile (summaries of loaded chunks, or saved chunks) varies from run to run, so I didn't get a repeatable kelp pair. The unit tests cover it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012gFJzABp1uePB4gm32PuaC --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:37 +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#5440
No description provided.