[PR #184] [MERGED] Fix status effect icons and display effects in inventories #2385

Closed
opened 2026-11-02 15:55:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/184
Author: @rdbtCVS
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: t3code/fix-effect-icon-rendering


📝 Commits (5)

  • 2fbbe1c Fix status effect icons and render inventory effect panels
  • d456dad Match vanilla inventory effect duration text color
  • 576e88b Zero-pad inventory effect duration fields
  • 8b6a286 Merge main and retain both HUD regression tests
  • 954b67f Merge main and preserve both HUD regression tests

📊 Changes

7 files changed (+380 additions, -16 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+4 -0)
📝 crates/horizon-client/src/game/potions.rs (+27 -13)
📝 crates/horizon-client/src/hud.rs (+69 -0)
📝 crates/horizon-client/src/hud_layout.rs (+8 -2)
📝 crates/horizon-client/src/hud_overlays.rs (+16 -1)
➕ crates/horizon-client/src/inventory_effects.rs (+255 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)

📄 Description

Active status effects previously showed empty HUD backgrounds because the sprite painter looked for mob_effect/<id> under gui/sprites/. Resolve effect icons from their actual atlas directory and display active effects beside both survival and creative inventories.

Inventory panels follow Minecraft 26.3's ordering, spacing, ambient backgrounds, effect levels and durations (including infinite effects and the current tick rate). Narrow windows use compact icons with hover tooltips; long names are clipped with a tooltip. Panel borders retain their original pixel size.

Validation:

  • cargo test --workspace: 795 passed, 0 failed, 1 ignored.
  • Final client tests in an isolated build directory (cargo test -p horizon-client --lib --bins --quiet): 485 passed.
  • cargo clippy --workspace --all-targets -- -D warnings, formatting and public-tree checks passed.
  • python tools/test_hud_parity.py --kind effects --count 300: 300/300 match vanilla, no oracle errors.
  • Visually checked the HUD and both inventory screens with locally prepared Minecraft 26.3 resources.

Regression coverage loads synthetic effect textures and verifies that the icons reach the draw batch, alongside panel layout, duration, ordering, compact-mode and border checks.

Screenshots:

HUD effect icons

HUD effect icons

Creative inventory

Creative inventory

Survival inventory

Survival inventory


🔄 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/184 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3code/fix-effect-icon-rendering` --- ### 📝 Commits (5) - [`2fbbe1c`](https://github.com/horizon-rust/horizon/commit/2fbbe1c5e2bb344ee5499afc248c8b83107bc976) Fix status effect icons and render inventory effect panels - [`d456dad`](https://github.com/horizon-rust/horizon/commit/d456dadafa3eb5e55a4f26fa94d382009370ef6c) Match vanilla inventory effect duration text color - [`576e88b`](https://github.com/horizon-rust/horizon/commit/576e88bd8ce7ceeb3cf9d032fcfb841ed2771f55) Zero-pad inventory effect duration fields - [`8b6a286`](https://github.com/horizon-rust/horizon/commit/8b6a2861b58fffeddc819246d92bad9d5bdd41e1) Merge main and retain both HUD regression tests - [`954b67f`](https://github.com/horizon-rust/horizon/commit/954b67ffa2b21638f61e1f50d51a1a7dffd3c676) Merge main and preserve both HUD regression tests ### 📊 Changes **7 files changed** (+380 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+4 -0) 📝 `crates/horizon-client/src/game/potions.rs` (+27 -13) 📝 `crates/horizon-client/src/hud.rs` (+69 -0) 📝 `crates/horizon-client/src/hud_layout.rs` (+8 -2) 📝 `crates/horizon-client/src/hud_overlays.rs` (+16 -1) ➕ `crates/horizon-client/src/inventory_effects.rs` (+255 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) </details> ### 📄 Description Active status effects previously showed empty HUD backgrounds because the sprite painter looked for `mob_effect/<id>` under `gui/sprites/`. Resolve effect icons from their actual atlas directory and display active effects beside both survival and creative inventories. Inventory panels follow Minecraft 26.3's ordering, spacing, ambient backgrounds, effect levels and durations (including infinite effects and the current tick rate). Narrow windows use compact icons with hover tooltips; long names are clipped with a tooltip. Panel borders retain their original pixel size. Validation: - `cargo test --workspace`: 795 passed, 0 failed, 1 ignored. - Final client tests in an isolated build directory (`cargo test -p horizon-client --lib --bins --quiet`): 485 passed. - `cargo clippy --workspace --all-targets -- -D warnings`, formatting and public-tree checks passed. - `python tools/test_hud_parity.py --kind effects --count 300`: 300/300 match vanilla, no oracle errors. - Visually checked the HUD and both inventory screens with locally prepared Minecraft 26.3 resources. Regression coverage loads synthetic effect textures and verifies that the icons reach the draw batch, alongside panel layout, duration, ordering, compact-mode and border checks. Screenshots: HUD effect icons ![HUD effect icons](https://raw.githubusercontent.com/rdbtCVS/horizon/bd133fb31127975afb34cabfa5587780dca5e167/hud.png) Creative inventory ![Creative inventory](https://raw.githubusercontent.com/rdbtCVS/horizon/bd133fb31127975afb34cabfa5587780dca5e167/creative.png) Survival inventory ![Survival inventory](https://raw.githubusercontent.com/rdbtCVS/horizon/bd133fb31127975afb34cabfa5587780dca5e167/survival.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:31 +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#2385
No description provided.