[PR #6161] [MERGED] Fix magenta grass block icon on the Superflat screens #6686

Closed
opened 2026-11-03 06:24:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6161
Author: @Joansitoh
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/6107-superflat-grass-tint


📝 Commits (3)

  • d46f1a6 Tint the Superflat layer grass block icon with the grass colormap
  • 80ad7fa Format flat.rs
  • b3384f9 Share the layer icon resolve with its test; move GrassEnv above slot docs

📊 Changes

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

View changed files

📝 crates/horizon-client/src/title/flat.rs (+46 -10)

📄 Description

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

What

The Superflat preset/layer screens drew the grass block icon in magenta. slot() in title/flat.rs resolved item models with NoEnv, whose grass_color default is -65281, which the minecraft:grass tint source of the grass block model picked up. It now uses a small GrassEnv that forwards ItemRenderer::grass_color (the colormap), exactly as the inventory does in game/item_draw.rs. The resolve is factored into layer_state so the test covers the same path.

Vanilla reference

GrassColor.get(temperature, downfall) via the grass_block item model's minecraft:grass tint source.

How tested

  • New unit test flat::tests::the_grass_block_layer_icon_is_tinted_by_the_colormap (resolves the grass block through layer_state, asserts no tint is the magenta -65281; skips when .local data is absent).
  • pr_ready --quick --base upstream/main: Public tree ✅, Python tests ✅ (585), clippy ✅, doc tests ✅. rustfmt failed on the first run (a line in my test) and was fixed before pushing; clippy -D warnings and flat::tests re-run clean after the final change. tests: horizon-client had 1 failure, entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation ("an airborne stand must fall"), in code this PR doesn't touch; it fails the same way when run alone.
  • No parity harness covers this client UI path. Remaining affected harnesses: run by CI's parity job.

Fixes #6107

Suggested label: none

🤖 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/6161 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6107-superflat-grass-tint` --- ### 📝 Commits (3) - [`d46f1a6`](https://github.com/horizon-rust/horizon/commit/d46f1a6831d26e7695a2ac716aa2b4fd4fc0cbae) Tint the Superflat layer grass block icon with the grass colormap - [`80ad7fa`](https://github.com/horizon-rust/horizon/commit/80ad7fac9b707ffdaa1f74a045fb19bd47c02365) Format flat.rs - [`b3384f9`](https://github.com/horizon-rust/horizon/commit/b3384f9bd2ae4848bd0e39a8cd89d722387dd2e7) Share the layer icon resolve with its test; move GrassEnv above slot docs ### 📊 Changes **1 file changed** (+46 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/title/flat.rs` (+46 -10) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What The Superflat preset/layer screens drew the grass block icon in magenta. `slot()` in `title/flat.rs` resolved item models with `NoEnv`, whose `grass_color` default is `-65281`, which the `minecraft:grass` tint source of the grass block model picked up. It now uses a small `GrassEnv` that forwards `ItemRenderer::grass_color` (the colormap), exactly as the inventory does in `game/item_draw.rs`. The resolve is factored into `layer_state` so the test covers the same path. ## Vanilla reference `GrassColor.get(temperature, downfall)` via the grass_block item model's `minecraft:grass` tint source. ## How tested - New unit test `flat::tests::the_grass_block_layer_icon_is_tinted_by_the_colormap` (resolves the grass block through `layer_state`, asserts no tint is the magenta `-65281`; skips when `.local` data is absent). - `pr_ready --quick --base upstream/main`: Public tree ✅, Python tests ✅ (585), clippy ✅, doc tests ✅. rustfmt failed on the first run (a line in my test) and was fixed before pushing; clippy `-D warnings` and `flat::tests` re-run clean after the final change. `tests: horizon-client` had 1 failure, `entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation` ("an airborne stand must fall"), in code this PR doesn't touch; it fails the same way when run alone. - No parity harness covers this client UI path. Remaining affected harnesses: run by CI's parity job. Fixes #6107 Suggested label: none 🤖 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-03 06:24:54 +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#6686
No description provided.