[PR #3455] [CLOSED] Colored hearts extra: tint the heart row per ten hearts #4993

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3455
Author: @JustKarkat
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: extra-colored-hearts


📝 Commits (10+)

  • f49659c Merge pull request #3586 from d3grando/fix-3246
  • 7f870d7 Merge pull request #3563 from d3grando/fix-3322
  • 3c63c59 run-parity: a push cancels the old head's run, other labels cancel nothing; cancel-on-close takes every head (#3651)
  • 58a4fd8 Merge pull request #3571 from d3grando/fix-3501
  • 215d8e7 Merge pull request #3411 from spidercraft/cape-rendering
  • c10553e Merge pull request #3439 from spidercraft/taa
  • 5e391eb Merge pull request #3500 from spidercraft/fix/firework-gaps
  • 9c5377a Mods: structures, sets, pools and templates from content mods reach command suggestions
  • 7443236 Merge pull request #3445 from d3grando/fix-3414
  • cf586e4 Merge pull request #3442 from d3grando/fix-copper-chest-double

📊 Changes

511 files changed (+46095 additions, -3718 deletions)

View changed files

➕ .claude/skills/vanilla-parity/SKILL.md (+76 -0)
📝 .github/pull_request_template.md (+2 -0)
📝 .github/workflows/cancel-on-close.yml (+6 -4)
📝 .github/workflows/game-build.yml (+5 -4)
📝 .github/workflows/run-parity.yml (+6 -2)
📝 AGENTS.md (+11 -6)
📝 README.md (+11 -6)
📝 ROADMAP.md (+111 -30)
📝 crates/horizon-client-core/src/component.rs (+102 -51)
📝 crates/horizon-client-core/src/lang.rs (+38 -1)
📝 crates/horizon-client-core/src/potions.rs (+2 -1)
📝 crates/horizon-client-core/src/registries.rs (+6 -0)
📝 crates/horizon-client-core/src/scoreboard.rs (+16 -4)
📝 crates/horizon-client-core/src/text.rs (+30 -25)
📝 crates/horizon-client-input/src/clipboard.rs (+29 -0)
📝 crates/horizon-client-input/src/keybinds.rs (+48 -13)
➕ crates/horizon-client-render/examples/compositor.rs (+151 -0)
📝 crates/horizon-client-render/src/assets.rs (+2 -1)
📝 crates/horizon-client-render/src/atlas_sources.rs (+8 -1)
📝 crates/horizon-client-render/src/biome.rs (+4 -0)

...and 80 more files

📄 Description

🤖 Opened by Joshua's AI agent (ZCode running GLM), not by Joshua himself.

What

A new Extras switch, coloredHearts (off by default): past ten hearts, the HUD stops adding vanilla rows and tints the single row of ten instead — the row of ten hearts the player is currently in, one color per row of ten, health first and then absorption with its own colors. Filling up through the colors as it regenerates reads as a stack: behind the current row's fill, the icons show full hearts of the row below's color, and the first row keeps the black container (covering only a half-filled icon's filled half).

How it follows vanilla

Built from Hud.extractPlayerHealth and the Hud.HeartType sprite tables of the pinned 26.3 client: the layout keeps vanilla's positions, blink and jitter while the player is within the first row. No other mod's source was read — the idea is ported from a behavior description, as docs/extras.md prescribes for extras.

Implementation

  • crates/horizon-client/src/heart_colors.rs (new): the recolor and the settings' color lists. Each heart sprite's distinct opaque colors, ranked by luminance (shade, body, highlight), map onto darker, plain and lighter copies of the target color — calibrated against the real sprites (FF1313 body, BB1313 shade, FFC8C8 highlight).
  • hud.rs: build_over_hearts bakes the tinted sprites into reserved atlas slots when the atlas is packed — always, whatever the switch says, so turning the extra on needs no restart and a resource pack's own hearts recolor too.
  • hud_layout.rs: colored_hearts() draws the row; HealthInputs.colored switches it on.
  • extras.rs: the switch, the Extras page row ("HUD" section), and the heartColors / absorptionColors #RRGGBB lists (up to 32 each) in horizon-extras.txt. Past the list's end the colors repeat in order, each full pass one step lighter (odd passes) or darker (even ones), a step further each time — deterministic, so even hundreds of hearts keep climbing through colors.
  • docs/extras.md: the section.

Tests

Unit tests for the recolor (tone order, blinking sprites, transparent pixels, the vanilla-red round trip), the color parsing/expansion, and the layout (one row of ten, the row below behind, half-container coverage, absorption's own colors, vanilla rows without the extra).

🤖 Generated with ZCode (GLM)


🔄 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/3455 **Author:** [@JustKarkat](https://github.com/JustKarkat) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `extra-colored-hearts` --- ### 📝 Commits (10+) - [`f49659c`](https://github.com/horizon-rust/horizon/commit/f49659c78b9d388f574c1d093037f7d5f86bf049) Merge pull request #3586 from d3grando/fix-3246 - [`7f870d7`](https://github.com/horizon-rust/horizon/commit/7f870d7447c252f1da567eea0beda614bc0f2c3a) Merge pull request #3563 from d3grando/fix-3322 - [`3c63c59`](https://github.com/horizon-rust/horizon/commit/3c63c5913e398722019c8db8c99976f932eaa688) run-parity: a push cancels the old head's run, other labels cancel nothing; cancel-on-close takes every head (#3651) - [`58a4fd8`](https://github.com/horizon-rust/horizon/commit/58a4fd8263a521dffe1076e9b85123fb246ec2fb) Merge pull request #3571 from d3grando/fix-3501 - [`215d8e7`](https://github.com/horizon-rust/horizon/commit/215d8e779a774670ddb001c66c567828febfff4d) Merge pull request #3411 from spidercraft/cape-rendering - [`c10553e`](https://github.com/horizon-rust/horizon/commit/c10553eebf4c6527ebe5448daf1b915b9e83d25a) Merge pull request #3439 from spidercraft/taa - [`5e391eb`](https://github.com/horizon-rust/horizon/commit/5e391eb67392941734df7ddd648728c4ed5302f6) Merge pull request #3500 from spidercraft/fix/firework-gaps - [`9c5377a`](https://github.com/horizon-rust/horizon/commit/9c5377a57159a5e92a4a30f3d6b10a7ebcb5e660) Mods: structures, sets, pools and templates from content mods reach command suggestions - [`7443236`](https://github.com/horizon-rust/horizon/commit/74432368506bd4cde3edfb20eb7cc6afc1ea2bdf) Merge pull request #3445 from d3grando/fix-3414 - [`cf586e4`](https://github.com/horizon-rust/horizon/commit/cf586e4159583e7f4cf70a3c108846f158f36b4f) Merge pull request #3442 from d3grando/fix-copper-chest-double ### 📊 Changes **511 files changed** (+46095 additions, -3718 deletions) <details> <summary>View changed files</summary> ➕ `.claude/skills/vanilla-parity/SKILL.md` (+76 -0) 📝 `.github/pull_request_template.md` (+2 -0) 📝 `.github/workflows/cancel-on-close.yml` (+6 -4) 📝 `.github/workflows/game-build.yml` (+5 -4) 📝 `.github/workflows/run-parity.yml` (+6 -2) 📝 `AGENTS.md` (+11 -6) 📝 `README.md` (+11 -6) 📝 `ROADMAP.md` (+111 -30) 📝 `crates/horizon-client-core/src/component.rs` (+102 -51) 📝 `crates/horizon-client-core/src/lang.rs` (+38 -1) 📝 `crates/horizon-client-core/src/potions.rs` (+2 -1) 📝 `crates/horizon-client-core/src/registries.rs` (+6 -0) 📝 `crates/horizon-client-core/src/scoreboard.rs` (+16 -4) 📝 `crates/horizon-client-core/src/text.rs` (+30 -25) 📝 `crates/horizon-client-input/src/clipboard.rs` (+29 -0) 📝 `crates/horizon-client-input/src/keybinds.rs` (+48 -13) ➕ `crates/horizon-client-render/examples/compositor.rs` (+151 -0) 📝 `crates/horizon-client-render/src/assets.rs` (+2 -1) 📝 `crates/horizon-client-render/src/atlas_sources.rs` (+8 -1) 📝 `crates/horizon-client-render/src/biome.rs` (+4 -0) _...and 80 more files_ </details> ### 📄 Description > 🤖 Opened by Joshua's AI agent (ZCode running GLM), not by Joshua himself. ## What A new **Extras** switch, `coloredHearts` (off by default): past ten hearts, the HUD stops adding vanilla rows and tints the single row of ten instead — the row of ten hearts the player is currently in, one color per row of ten, health first and then absorption with its own colors. Filling up through the colors as it regenerates reads as a stack: behind the current row's fill, the icons show full hearts of the row below's color, and the first row keeps the black container (covering only a half-filled icon's filled half). ## How it follows vanilla Built from `Hud.extractPlayerHealth` and the `Hud.HeartType` sprite tables of the pinned 26.3 client: the layout keeps vanilla's positions, blink and jitter while the player is within the first row. No other mod's source was read — the idea is ported from a behavior description, as `docs/extras.md` prescribes for extras. ## Implementation - `crates/horizon-client/src/heart_colors.rs` (new): the recolor and the settings' color lists. Each heart sprite's distinct opaque colors, ranked by luminance (shade, body, highlight), map onto darker, plain and lighter copies of the target color — calibrated against the real sprites (`FF1313` body, `BB1313` shade, `FFC8C8` highlight). - `hud.rs`: `build_over_hearts` bakes the tinted sprites into reserved atlas slots when the atlas is packed — always, whatever the switch says, so turning the extra on needs no restart and a resource pack's own hearts recolor too. - `hud_layout.rs`: `colored_hearts()` draws the row; `HealthInputs.colored` switches it on. - `extras.rs`: the switch, the Extras page row ("HUD" section), and the `heartColors` / `absorptionColors` `#RRGGBB` lists (up to 32 each) in `horizon-extras.txt`. Past the list's end the colors repeat in order, each full pass one step lighter (odd passes) or darker (even ones), a step further each time — deterministic, so even hundreds of hearts keep climbing through colors. - `docs/extras.md`: the section. ## Tests Unit tests for the recolor (tone order, blinking sprites, transparent pixels, the vanilla-red round trip), the color parsing/expansion, and the layout (one row of ten, the row below behind, half-container coverage, absorption's own colors, vanilla rows without the extra). 🤖 Generated with [ZCode](https://zcode.ai) (GLM) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09: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#4993
No description provided.