[PR #2880] [MERGED] Worn dyed leather armour shows its dye colour #4666

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2880
Author: @leifiyoo
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: dyed-leather-armour-colour


📝 Commits (2)

  • e7f5201 Client: worn dyed leather armour shows its dye colour
  • 8057d27 Worn armour: only a dyeable layer takes the stack's dye

📊 Changes

1 file changed (+35 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/armor_stands.rs (+35 -6)

📄 Description

🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself.

What and why

Worn dyed leather armour looked brown: the player, LAN guests and armour stands used only the equipment definition's undyed colour and ignored the dye on the worn item. Now the colour follows the dye when there is one, then the undyed colour, then white, as the vanilla layer colour does.

Refs #2774 (the report also mentions mob armour, which this does not change: mobs store only item names, so their dye is not carried yet).

Vanilla reference

  • EquipmentLayerRenderer.renderLayers: dyeColor = DyedItemColor.getOrDefault(itemStack, 0).
  • getColorForLayer: returns dyeColor when it is non-zero, else colorWhenUndyed for dyeable layers.
  • DyedItemColor.getOrDefault reads DataComponents.DYED_COLOR.

Harness: none. This is rendering-only; covered by the unit test layer_color_tests::a_dyed_stack_overrides_the_undyed_leather_colour in armor_stands.rs.

Not verified

  • No in-game visual check on a running client.
  • Mob armour and horse leather armour still use the fixed brown.

Self-check

Run on Windows, python3 tools/pr_ready.py --quick --base upstream/main:

  • rustfmt: pass
  • clippy with -D warnings: pass
  • horizon-client lib tests, run single-threaded: 1160 passed, 2 failed (crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive, both Windows-only; this branch does not touch crash.rs or save.rs)
  • Python tests: fail on Windows, the same failures as on clean main

🤖 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/2880 **Author:** [@leifiyoo](https://github.com/leifiyoo) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `dyed-leather-armour-colour` --- ### 📝 Commits (2) - [`e7f5201`](https://github.com/horizon-rust/horizon/commit/e7f5201c1f89b4ad7128f492bb16b8808e1f8d34) Client: worn dyed leather armour shows its dye colour - [`8057d27`](https://github.com/horizon-rust/horizon/commit/8057d27511a9df7d8b9f473af9054da012db6f2b) Worn armour: only a dyeable layer takes the stack's dye ### 📊 Changes **1 file changed** (+35 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/armor_stands.rs` (+35 -6) </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself. ## What and why Worn dyed leather armour looked brown: the player, LAN guests and armour stands used only the equipment definition's undyed colour and ignored the dye on the worn item. Now the colour follows the dye when there is one, then the undyed colour, then white, as the vanilla layer colour does. Refs #2774 (the report also mentions mob armour, which this does not change: mobs store only item names, so their dye is not carried yet). ## Vanilla reference - `EquipmentLayerRenderer.renderLayers`: `dyeColor = DyedItemColor.getOrDefault(itemStack, 0)`. - `getColorForLayer`: returns `dyeColor` when it is non-zero, else `colorWhenUndyed` for dyeable layers. - `DyedItemColor.getOrDefault` reads `DataComponents.DYED_COLOR`. Harness: none. This is rendering-only; covered by the unit test `layer_color_tests::a_dyed_stack_overrides_the_undyed_leather_colour` in `armor_stands.rs`. ## Not verified - No in-game visual check on a running client. - Mob armour and horse leather armour still use the fixed brown. ## Self-check Run on Windows, `python3 tools/pr_ready.py --quick --base upstream/main`: - rustfmt: pass - clippy with `-D warnings`: pass - `horizon-client` lib tests, run single-threaded: 1160 passed, 2 failed (`crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive`, both Windows-only; this branch does not touch `crash.rs` or `save.rs`) - Python tests: fail on Windows, the same failures as on clean `main` 🤖 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 05:07:03 +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#4666
No description provided.