Creative inventory: every tab and the search as vanilla builds them; scrollbar drag

The creative-tabs.json export failed to build the functional blocks tab (no
data-pack registries: banner patterns), and its fallback read decompiled
sources from a path that no longer exists, so the tab was empty and anvils,
crafting and smithing tables were missing from the tabs and the search. The
search also matched only an approximate display name.

VanillaCreativeTabsExporter now builds every tab with vanilla's own
CreativeModeTabs.tryRebuildTabContents over the vanilla data pack's
registries and writes creative-inventory.json: stacks with components, and
the search tab's creative tooltip lines and tags. The client searches them
as SessionSearchTrees does (FullTextSearchTree, IdSearchTree after '#').
Changing tab empties the search box, as in selectTab.

The scrollbar only jumped to the pressed point; holding it now scrolls as
the mouse moves, anywhere, until release (mouseClicked/mouseDragged), and
the wheel and the scroller follow ItemPickerMenu.

tools/test_creative_parity.py compares every tab and 6,793 searches with
the vanilla client's own search trees. horizon-ctl `type` also fills the
creative search box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 22:24:55 +02:00
parent 97245773d1
commit cac89a9995
9 changed files with 783 additions and 127 deletions
+15
View File
@@ -1523,6 +1523,21 @@ suggestions the server's dispatcher answers as
input's state and every call. Not compared: the mouse wheel over the
suggestion list and clipboard keys.
`horizon_client::creative` is the creative inventory. Its tabs come from
`creative-inventory.json`, which `VanillaCreativeTabsExporter` writes from
vanilla's own `CreativeModeTabs.tryRebuildTabContents` over the vanilla data
pack's registries: every stack with its components, and for each stack of the
search tab the creative tooltip lines and item tags that the client's search
trees index. The search ports `refreshSearchResults` and `SessionSearchTrees`
(substring matches over tooltip lines; after a colon the item id's namespace,
then its path or a line; tags after `#`), and the scrollbar follows
`mouseClicked`/`mouseDragged`/`mouseScrolled`. `tools/test_creative_parity.py`
compares every shown tab's stacks, the search tab and 6,793 searches (fixed
queries, then every stack's item path and tooltip lines and every tag, whole
and halved) with the vanilla client's own search trees
(`VanillaCreativeSearchOracle`). Not compared: the operator tab (off by
default, `operatorItemsTab`) and the saved hotbars tab.
## Pillager patrols and raids
`horizon_client::patrol` ports `PatrolSpawner` and `horizon_client::raid` ports