[GH-ISSUE #3426] Creative inventory tooltips don't list the creative tabs an item belongs to (search tab, inventory tab, hotbar row) #970

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

Originally created by @degepie on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3426

🤖 Filed by degepie's AI agent (Claude Code), not by degepie personally.

What happens

In the creative inventory's search tab, hovering an item shows only the item's normal tooltip. Vanilla adds, right under the name, one blue line per creative tab that contains the item (e.g. Building Blocks, Natural Blocks).

What vanilla does

CreativeModeInventoryScreen.getTooltipFromContainerItem(ItemStack) (26.3 client jar) keeps the plain item tooltip only for a category tab's own grid slots (a CustomCreativeSlot while a CreativeModeTab.Type.CATEGORY tab is selected). Everywhere else in the creative screen it adds lines after the item name:

  • for every tab in CreativeModeTabs.tabs() order, except the search tab, whose CreativeModeTab.contains(stack) is true (that is, displayItemsSearchTab holds the stack): the tab's display name in blue (ChatFormatting.BLUE), inserted from line 1;
  • in the search tab's grid, when the search is a #tag query: each visible tag the item has, as a dark purple (ChatFormatting.DARK_PURPLE) #namespace:path line.

So the tab names appear whenever the hovered slot is not a category tab's own grid slot:

  • every item in the search tab's grid;
  • the hotbar row at the bottom of a category tab (plain slots, not CustomCreativeSlot);
  • the Survival Inventory tab and the saved-hotbars tab.

Where in Horizon

origin/main 142388e1c (142388e1c136e622652ec7505af15d8ad195e041), from code:

  • crates/horizon-client/src/game.rs:11176 draw_creative: the grid (11290-11310) and the hotbar row (11312-11323) both just set hovered, then 11358-11364 call draw_stack_tooltip(batch, &item, …); the inventory tab goes through draw_slot_tooltip.
  • crates/horizon-client/src/game/stations.rs:2241 draw_stack_tooltip → stack_tooltip_lines: no tab-name or tag lines anywhere.
  • The data is already there: crates/horizon-client/src/creative.rs has the tabs with their items and the search entries' item tags, and Game::creative_tab_title (game.rs:11162) resolves itemGroup.* titles.

How to reproduce

  1. Creative world, open the inventory, go to the search tab.
  2. Hover e.g. Oak Log. Vanilla: Oak Log / Building Blocks / Natural Blocks (blue). Horizon: Oak Log only.
  3. Same for any item on the hotbar row of a category tab, or in the Survival Inventory tab.

Verified from code and the 26.3 jar; not checked in game for this report (horizon-ctl has no hover command).

Notes

  • Not covered by the creative parity harness, which compares tab contents and search results, not tooltips.
  • Related but separate: the creative-slot TooltipFlag.asCreative() part of this method is being handled for suspicious stews in #3405.
Originally created by @degepie on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3426 > 🤖 Filed by degepie's AI agent (Claude Code), not by degepie personally. ## What happens In the creative inventory's search tab, hovering an item shows only the item's normal tooltip. Vanilla adds, right under the name, one blue line per creative tab that contains the item (e.g. `Building Blocks`, `Natural Blocks`). ## What vanilla does `CreativeModeInventoryScreen.getTooltipFromContainerItem(ItemStack)` (26.3 client jar) keeps the plain item tooltip only for a category tab's own grid slots (a `CustomCreativeSlot` while a `CreativeModeTab.Type.CATEGORY` tab is selected). Everywhere else in the creative screen it adds lines after the item name: - for every tab in `CreativeModeTabs.tabs()` order, except the search tab, whose `CreativeModeTab.contains(stack)` is true (that is, `displayItemsSearchTab` holds the stack): the tab's display name in **blue** (`ChatFormatting.BLUE`), inserted from line 1; - in the search tab's grid, when the search is a `#tag` query: each visible tag the item has, as a **dark purple** (`ChatFormatting.DARK_PURPLE`) `#namespace:path` line. So the tab names appear whenever the hovered slot is **not** a category tab's own grid slot: - every item in the search tab's grid; - the hotbar row at the bottom of a category tab (plain slots, not `CustomCreativeSlot`); - the Survival Inventory tab and the saved-hotbars tab. ## Where in Horizon origin/main 142388e1c (`142388e1c136e622652ec7505af15d8ad195e041`), from code: - `crates/horizon-client/src/game.rs:11176` `draw_creative`: the grid (`11290-11310`) and the hotbar row (`11312-11323`) both just set `hovered`, then `11358-11364` call `draw_stack_tooltip(batch, &item, …)`; the inventory tab goes through `draw_slot_tooltip`. - `crates/horizon-client/src/game/stations.rs:2241` `draw_stack_tooltip` → `stack_tooltip_lines`: no tab-name or tag lines anywhere. - The data is already there: `crates/horizon-client/src/creative.rs` has the tabs with their items and the search entries' item tags, and `Game::creative_tab_title` (`game.rs:11162`) resolves `itemGroup.*` titles. ## How to reproduce 1. Creative world, open the inventory, go to the search tab. 2. Hover e.g. Oak Log. Vanilla: `Oak Log` / `Building Blocks` / `Natural Blocks` (blue). Horizon: `Oak Log` only. 3. Same for any item on the hotbar row of a category tab, or in the Survival Inventory tab. Verified from code and the 26.3 jar; not checked in game for this report (horizon-ctl has no hover command). ## Notes - Not covered by the `creative` parity harness, which compares tab contents and search results, not tooltips. - Related but separate: the creative-slot `TooltipFlag.asCreative()` part of this method is being handled for suspicious stews in #3405.
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#970
No description provided.