mojira.dev
MC-124553

Recipe book/creative search returns weird results for attributes

This behavior was introduced in 1.12-pre6.

The bug

Run recipe give @p * to get all the recipes, then right-click a crafting table and open the recipe book.

Most searches will find any items whose full tooltip text matches whatever you type in the search box. Notably, searches like "att" or "hand" show all weapons and tools, since they list "Attack Damage" and "When in Main Hand" as part of the tooltip. This is fine and good.

Expected behavior

The subset of recipes that appears for a search "foo" is all the recipes whose output item has "foo" as a substring of its tooltip text.

Observed behavior

Try a search like "6". Some of the search results, like "Iron Chestplate ... +6 Armor" or "Diamond Leggings ... +6 Armor", make sense. But "Wooden Axe" (0.8 Attack Speed, 7 Attack Damage) also shows up, despite containing no "6". Other numerals have similar nonsensical results.

Note that if and when custom recipes can provide NBT outputs (e.g., name or lore), I expect the recipe book search to utilize the custom name and lore.

Linked issues

Attachments

Comments 5

Tools use a friendlier tooltip that shows the "final" attribute instead of the more confusing "+X damage" applied to your base attack. But it seems the search options are reading from the usual tooltip that isn't present instead of the real one. Attached screenshot

Can confirm in 20w49a.

Can confirm in 21w03a.

Can confirm in 21w05b.

I'm not sure if this one would fall under this same ticket or if it should have a new report, but:

Typing "damage" into the search bar returns every tool/weapon (because of the 'attack damage' attribute) except for all the hoes, despite the fact that hoes have 'attack damage' attributes.
Even weirder, typing "attack" or "speed" into the search bar returns every tool/weapon (because of the 'attack speed' attribute) except for just diamond and netherite hoes. I have absolutely no idea why.

Edit: Created MC-216653 for this

Brian McNamara

(Unassigned)

Confirmed

UI

recipe-book

Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w16a, Minecraft 1.13-pre1, ..., 1.19.1, 1.20.4, 24w03b, 1.21.5, 1.21.6 Pre-Release 3

Retrieved