[PR #792] [MERGED] Fix item tooltip display parity #2815

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/792
Author: @LookImEcho-Rick
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ludovic111

Base: main ← Head: codex/tooltip-display-parity


📝 Commits (1)

  • 2faa99e Fix item tooltip display parity

📊 Changes

6 files changed (+292 additions, -39 deletions)

View changed files

➕ crates/horizon-client/examples/tooltip_display_fixture.rs (+40 -0)
📝 crates/horizon-client/src/game/stations.rs (+56 -27)
📝 crates/horizon-client/src/item_data.rs (+28 -12)
📝 crates/horizon-client/src/item_tooltip.rs (+101 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTooltipDisplayOracle.java (+36 -0)
➕ tools/test_tooltip_display_parity.py (+31 -0)

📄 Description

What and why

Horizon now respects minecraft:tooltip_display when building item tooltips. Hidden components suppress their matching detail rows, and hide_tooltip hides the full tooltip outside creative while preserving the creative item name. The raid captain banner keeps its vanilla default of hiding banner pattern names, while explicit overrides round-trip.

Adds a Java oracle and Rust probe for the name and attribute visibility behavior.

Vanilla reference

Followed net.minecraft.world.item.ItemStack#getTooltipLines and net.minecraft.world.item.component.TooltipDisplay in the pinned Minecraft 26.3 client.

Checks

  • Passed: cargo fmt -p horizon-client -- --check
  • Passed: cargo clippy --workspace --all-targets --locked -- -D warnings
  • Passed: python tools/check_public_tree.py
  • Passed: headless Java/Rust comparison against the pinned client, 6/6 cases
  • Partial: cargo test --locked -p horizon-client ran 849 tests: 834 passed, 11 ignored, 4 failed in unrelated crash, sprite rounding, pack cache, and save lock tests. Each failure reproduced individually on this Windows host.
  • Partial: python -m unittest discover -s tests ran 215 tests; 2 import errors because tools.parity calls os.uname(), which is unavailable in Windows Python.
  • tools/pr_ready.py --base origin/main could not run here because that same os.uname() platform incompatibility occurs during import. Workspace-wide cargo fmt --all -- --check also hit a Windows filename-length limit; formatting the touched crate passed.

Manual UI screenshot was not captured in this headless run.


🔄 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/792 **Author:** [@LookImEcho-Rick](https://github.com/LookImEcho-Rick) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `codex/tooltip-display-parity` --- ### 📝 Commits (1) - [`2faa99e`](https://github.com/horizon-rust/horizon/commit/2faa99e5f1632f9efbe5a15300a7a0e901708142) Fix item tooltip display parity ### 📊 Changes **6 files changed** (+292 additions, -39 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/examples/tooltip_display_fixture.rs` (+40 -0) 📝 `crates/horizon-client/src/game/stations.rs` (+56 -27) 📝 `crates/horizon-client/src/item_data.rs` (+28 -12) 📝 `crates/horizon-client/src/item_tooltip.rs` (+101 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTooltipDisplayOracle.java` (+36 -0) ➕ `tools/test_tooltip_display_parity.py` (+31 -0) </details> ### 📄 Description ## What and why Horizon now respects `minecraft:tooltip_display` when building item tooltips. Hidden components suppress their matching detail rows, and `hide_tooltip` hides the full tooltip outside creative while preserving the creative item name. The raid captain banner keeps its vanilla default of hiding banner pattern names, while explicit overrides round-trip. Adds a Java oracle and Rust probe for the name and attribute visibility behavior. ## Vanilla reference Followed `net.minecraft.world.item.ItemStack#getTooltipLines` and `net.minecraft.world.item.component.TooltipDisplay` in the pinned Minecraft 26.3 client. ## Checks - Passed: `cargo fmt -p horizon-client -- --check` - Passed: `cargo clippy --workspace --all-targets --locked -- -D warnings` - Passed: `python tools/check_public_tree.py` - Passed: headless Java/Rust comparison against the pinned client, 6/6 cases - Partial: `cargo test --locked -p horizon-client` ran 849 tests: 834 passed, 11 ignored, 4 failed in unrelated crash, sprite rounding, pack cache, and save lock tests. Each failure reproduced individually on this Windows host. - Partial: `python -m unittest discover -s tests` ran 215 tests; 2 import errors because `tools.parity` calls `os.uname()`, which is unavailable in Windows Python. - `tools/pr_ready.py --base origin/main` could not run here because that same `os.uname()` platform incompatibility occurs during import. Workspace-wide `cargo fmt --all -- --check` also hit a Windows filename-length limit; formatting the touched crate passed. Manual UI screenshot was not captured in this headless run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:59:16 +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#2815
No description provided.