From bdbc816486ea2bc8aa3362a8547be73af897a9a1 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 25 Oct 2026 18:53:20 +0100 Subject: [PATCH] Creative search: match the localized hover name, not the item's base name The base name (Tipped Arrow, Potion, White Banner) matched where vanilla's first tooltip line (Arrow of Poison, Water Bottle, Ominous Banner) doesn't: the creative harness found extra results for 'e', 'potion', 'tipped' and 'white'. name_line builds the full hover name through display_get. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/creative.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/horizon-client/src/creative.rs b/crates/horizon-client/src/creative.rs index 593aad61d..249e40b11 100644 --- a/crates/horizon-client/src/creative.rs +++ b/crates/horizon-client/src/creative.rs @@ -346,10 +346,16 @@ impl Creative { } // FullTextSearchTree: tooltip lines, and the item id after a colon. // The export's lines are English (they come from the vanilla jars); - // the display name in the selected language is matched too, so a - // localized search finds the item. + // the hover name in the selected language is matched too, so a + // localized search finds the item. It is the whole name (a tipped + // arrow's potion, the ominous banner), as the first line is. let text = java_lower(term); - let localized = |i: usize| java_lower(&names.display_item(&self.search_items[i].item)); + let localized = |i: usize| { + java_lower(&crate::item_tooltip::name_line( + &self.search_items[i], + &|k| names.display_get(k), + )) + }; all.filter(|&i| { let e = &self.search_index[i]; let fallback;