[PR #519] [MERGED] Show equipment attributes in inventory and Creative tooltips #2619

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/519
Author: @Online5277
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @ludovic111

Base: main ← Head: fix/equipment-attribute-tooltips


📝 Commits (5)

  • 1ee64de Show equipment attributes in hover tooltips
  • 3db9a25 Keep equipment attribute tooltip translations at runtime
  • e5fcdaa Show full equipment tooltips in Creative item tabs
  • 7f4636f Merge origin/main into equipment attribute tooltips
  • 591e6f9 Merge main into fix/equipment-attribute-tooltips

📊 Changes

3 files changed (+191 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/enchant.rs (+2 -0)
📝 crates/horizon-client/src/game/stations.rs (+28 -0)
📝 crates/horizon-client/src/item_tooltip.rs (+161 -18)

📄 Description

Equipment hover tooltips omit their attribute modifiers, and Creative item tabs display only the base item name. Share the recipe-search slot-group formatter with hover tooltips, adding the player's base attack damage/speed for the standard base-attack modifier IDs. Display those totals in dark green, slot headings in gray, and ordinary positive/negative modifiers in blue/red. Armor modifiers use the same path. Creative item-tab/search results and their hotbar row now retain the hovered stack and use the full stack tooltip renderer, so those screens include the same attribute headings and values as normal inventory tooltips.

Fixes #400.

Keep attribute.* and item.modifiers.* in the runtime translation table so headings, modifier templates and attribute names resolve instead of displaying raw translation keys. Read instantiated player attribute base overrides when available, falling back to the normal player bases (1 damage, 4 speed). Active effect and equipment modifiers are not included in these base values. Recipe search retains its playerless signed modifier lines.

Validation:

  • Five tooltip tests pass, including a regression through the real language loader that reproduces untranslated headings and values without the fix.
  • A prepared-resource test checks the exported diamond-sword and helmet modifiers against the runtime English translations: 7 Attack Damage, 1.6 Attack Speed, +3 Armor and +2 Armor Toughness.
  • Grouping, colors, custom player bases and recipe formatting remain covered. Twelve Creative-related checks pass; the client binary compiles with the shared tooltip path wired into Creative rendering. The actual Creative tooltip display remains a manual check.
  • Client all-targets Clippy, formatting and diff checks pass.

Draft pending manual testing: hover a diamond sword, diamond axe, pickaxe and armor in Creative item tabs/search results, the Creative hotbar row, the Creative inventory tab, normal inventory, and a workstation or recipe result. Check translated headings, spacing, green attack totals, and armor modifiers. Change a base with /attribute @s minecraft:attack_damage base set 2, check the tooltip updates, then reset it. No client window or native pixel comparison was run.

Uses exported item-default modifiers. Per-stack custom attribute component/display overrides remain unsupported.


🔄 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/519 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/equipment-attribute-tooltips` --- ### 📝 Commits (5) - [`1ee64de`](https://github.com/horizon-rust/horizon/commit/1ee64ded5547bd16971650e4cd10e64e3b3e6d09) Show equipment attributes in hover tooltips - [`3db9a25`](https://github.com/horizon-rust/horizon/commit/3db9a250bec7465defe041ef391c651df7244db9) Keep equipment attribute tooltip translations at runtime - [`e5fcdaa`](https://github.com/horizon-rust/horizon/commit/e5fcdaaec658693744e5ca82e5133529e58f9ae9) Show full equipment tooltips in Creative item tabs - [`7f4636f`](https://github.com/horizon-rust/horizon/commit/7f4636fcb5f4a546d205263bf224a7fc574bc606) Merge origin/main into equipment attribute tooltips - [`591e6f9`](https://github.com/horizon-rust/horizon/commit/591e6f916194d90e7c0a0824c643d73624b5e093) Merge main into fix/equipment-attribute-tooltips ### 📊 Changes **3 files changed** (+191 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/enchant.rs` (+2 -0) 📝 `crates/horizon-client/src/game/stations.rs` (+28 -0) 📝 `crates/horizon-client/src/item_tooltip.rs` (+161 -18) </details> ### 📄 Description Equipment hover tooltips omit their attribute modifiers, and Creative item tabs display only the base item name. Share the recipe-search slot-group formatter with hover tooltips, adding the player's base attack damage/speed for the standard base-attack modifier IDs. Display those totals in dark green, slot headings in gray, and ordinary positive/negative modifiers in blue/red. Armor modifiers use the same path. Creative item-tab/search results and their hotbar row now retain the hovered stack and use the full stack tooltip renderer, so those screens include the same attribute headings and values as normal inventory tooltips. Fixes #400. Keep `attribute.*` and `item.modifiers.*` in the runtime translation table so headings, modifier templates and attribute names resolve instead of displaying raw translation keys. Read instantiated player attribute base overrides when available, falling back to the normal player bases (1 damage, 4 speed). Active effect and equipment modifiers are not included in these base values. Recipe search retains its playerless signed modifier lines. Validation: - Five tooltip tests pass, including a regression through the real language loader that reproduces untranslated headings and values without the fix. - A prepared-resource test checks the exported diamond-sword and helmet modifiers against the runtime English translations: 7 Attack Damage, 1.6 Attack Speed, +3 Armor and +2 Armor Toughness. - Grouping, colors, custom player bases and recipe formatting remain covered. Twelve Creative-related checks pass; the client binary compiles with the shared tooltip path wired into Creative rendering. The actual Creative tooltip display remains a manual check. - Client all-targets Clippy, formatting and diff checks pass. Draft pending manual testing: hover a diamond sword, diamond axe, pickaxe and armor in Creative item tabs/search results, the Creative hotbar row, the Creative inventory tab, normal inventory, and a workstation or recipe result. Check translated headings, spacing, green attack totals, and armor modifiers. Change a base with `/attribute @s minecraft:attack_damage base set 2`, check the tooltip updates, then reset it. No client window or native pixel comparison was run. Uses exported item-default modifiers. Per-stack custom attribute component/display overrides remain unsupported. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:41 +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#2619
No description provided.