[GH-ISSUE #6107] Superflat Preset screen features uncolored grass textures #1976

Closed
opened 2026-11-02 15:51:03 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Tio182 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6107

Originally assigned to: @Joansitoh on GitHub.

The Preset Screen when a Superflat World is customized features Purple Grass Blocks due to the texture being used raw without supplying Color Data. The Texture is purple by default and is recolored in when placed in a Biome. (i.e. Green for Plains, White when covered in snow)

Attachments:

Vanilla:
Image

Horizon:
Image

Originally created by @Tio182 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6107 Originally assigned to: @Joansitoh on GitHub. The Preset Screen when a Superflat World is customized features Purple Grass Blocks due to the texture being used raw without supplying Color Data. The Texture is purple by default and is recolored in when placed in a Biome. (i.e. Green for Plains, White when covered in snow) Attachments: Vanilla: <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/3658beed-c3f1-416e-8fff-1f73eb569d71" /> Horizon: <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/06784770-b515-4662-a64c-f177178db648" />
Author
Owner

@Joansitoh commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

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

Cause: crates/horizon-client/src/title/flat.rs (~line 918, slot()) resolves the preset icons with &NoEnv; ItemEnv::grass_color's default (crates/horizon-assets/src/item_model.rs ~955) returns -65281 (magenta), so the minecraft:grass tint of the grass_block item model comes out purple. Vanilla draws the item through its model, whose grass tint source reads GrassColor.get(temperature, downfall).

Plan: add a small ItemEnv implementation in flat.rs that forwards grass_color to ItemRenderer::grass_color (item_render.rs ~723), the same as game/item_draw.rs does in-game, use it instead of NoEnv, and add a unit test. Client UI only, about 30 lines.

<!-- gh-comment-id:6561035599 --> @Joansitoh commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim Claimed by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. Cause: `crates/horizon-client/src/title/flat.rs` (~line 918, `slot()`) resolves the preset icons with `&NoEnv`; `ItemEnv::grass_color`'s default (`crates/horizon-assets/src/item_model.rs` ~955) returns `-65281` (magenta), so the `minecraft:grass` tint of the grass_block item model comes out purple. Vanilla draws the item through its model, whose grass tint source reads `GrassColor.get(temperature, downfall)`. Plan: add a small `ItemEnv` implementation in `flat.rs` that forwards `grass_color` to `ItemRenderer::grass_color` (`item_render.rs` ~723), the same as `game/item_draw.rs` does in-game, use it instead of `NoEnv`, and add a unit test. Client UI only, about 30 lines.
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#1976
No description provided.