From e70c9fdd691f42a25e67d74af3b8ca0b7a0df4fe Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 06:22:53 +0200 Subject: [PATCH] Document the recipe book search, ghost recipe and hotbar harnesses; more old options.txt bodies Co-Authored-By: Claude Sonnet 5.5 --- docs/rust-parity.md | 26 +++++++++++++++++++++++--- tools/test_options_parity.py | 9 +++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/rust-parity.md b/docs/rust-parity.md index 977076575..b2027464e 100644 --- a/docs/rust-parity.md +++ b/docs/rust-parity.md @@ -1426,14 +1426,34 @@ vanilla's own classes, and the game uses that code: paints them. `tools/test_recipe_book_render_parity.py` builds vanilla's widgets for 600 states (`VanillaRecipeBookScreenOracle`) and compares every call. Ingredients cycle in their `HolderSet` order (tags in `TagLoader` order). +- **The book's text search.** `recipe_book_view` also searches: the oracle + builds `SessionSearchTrees`' `FullTextSearchTree` over the tooltip lines and + ids of every result a display can show, and `item_tooltip` writes those + lines (attribute modifiers, smithing template, potion, dyed, pot, rocket and + disc lines; the names of potions, templates and banner patterns). Displays + with several results (map copies, tipped arrows, dyed armour) keep them in + `Entry::variants`. +- **The ghost recipe.** `Book::ghost` is the one place that fills a recipe's + ingredients into the grid or furnace slots (`PlaceRecipeHelper`'s centring, + the first slots for shapeless recipes, every fuel for an empty fuel slot, in + the registry's component-lookup order); `tools/test_ghost_recipe_parity.py` + runs `fillGhostRecipe` against the real menus for all 2,698 recipe and menu + pairs. - **The loom's banner preview.** `item_render::gui::draw_banner_result` draws `GuiBannerResultRenderer`'s flag model and layers in the 20x40 picture in picture, lit with `ITEMS_FLAT`; the block entity render harness compares its quads under the picture-in-picture pose. -Not compared yet: the recipe book's text search, furnaces awarding their -recipes and experience when their output is taken, and the limited crafting -game rule. +Not compared yet: furnaces awarding their recipes and experience when their +output is taken, and the limited crafting game rule. Tooltips in general lack +the lines `item_tooltip` writes for recipe results (the game's hover tooltips +do not show attribute modifiers yet). + +`horizon_client::hotbar` reads the creative toolbars of an older `hotbar.nbt` +through the `HOTBAR` data fixers (`EmptyItemInHotbarFix`, every item stack +fixer): `tools/test_hotbar_parity.py` loads generated files of 34 versions with +the real `HotbarManager`. The toolbar screen (save and load keys) is not wired +to it yet. ## Player list and world border rendering diff --git a/tools/test_options_parity.py b/tools/test_options_parity.py index c1c17bf23..95732663d 100644 --- a/tools/test_options_parity.py +++ b/tools/test_options_parity.py @@ -145,6 +145,15 @@ def make_cases(build): 'graphicsMode:1\nlang:Fr_Ca\nresourcePacks:["a","programer_art"]\nincompatibleResourcePacks:["programer_art"]\n', 'key_key.forward:abc\n', 'key_key.forward:\n', 'key_key.attack:k\n', 'chatOpacity:Infinity\n', 'chatOpacity: 0.5d\n', 'menuBackgroundBlurriness:0.25\n', 'menuBackgroundBlurriness:1.04999\n', + # OptionsForceVBOFix writes a key nothing reads; the lower-casing, key and graphics fixers on odd values. + 'useVbo:false\nao:true\nao:3\n', 'ao:\n', 'graphicsMode:3\nao:2\n', 'graphicsMode:abc\n', 'fancyGraphics:abc\n', + 'fancyGraphics:TRUE\n', 'lang:\u039f\u0394\u03a5\u03a3\u03a3\u0395\u03a5\u03a3\n', 'lang:\u0130_TR\n', 'lang:\u00df_\u00dc\n', + 'key_key.attack:-101\nkey_key.use:-92\nkey_key.forward:2147483647\nkey_key.back:99999\nkey_key.left:-2147483648\n', + 'key_key.hotbar.1:2\nkey_key.hotbar.9:10\nkey_key.swapHands:33\nkey_key.drop:16\nkey_key.debug.modifier:292\n', + 'showNowPlayingToast:maybe\n', 'showNowPlayingToast:true\nmusicToast:never\n', + 'resourcePacks:["programer_art","x"]\nincompatibleResourcePacks:[]\n', 'resourcePacks:[\'programer_art\']\n', + 'menuBackgroundBlurriness:-3\n', 'menuBackgroundBlurriness:1e3\n', 'menuBackgroundBlurriness:\n', 'chatOpacity:0\n', + 'chatOpacity:1\ntextBackgroundOpacity:0.2\n', 'preferredGraphicsBackend:vulkan\n', 'onboardAccessibility:true\n', ] versions = [-1, 0, 100, 504, 505, 815, 816, 1343, 1344, 1445, 1446, 1935, 1936, 2555, 2556, 2557, 2558, 3200, 3201, 3213, 3214, 3318, 3319, 3942, 3943, 4650, 4651, 4660, 4661, 4891, 4892, 5022, 5023, 5024, 9999]