mojira.dev
MC-313321

Keyboard-focused villager trades don't show the enchantments of enchanted books in their tooltips

The Bug:

Keyboard-focused villager trades don't show the enchantments of enchanted books in their tooltips.

Keyboard-focused recipes in the stonecutter show the full tooltips of their items, just like villager trades do when hovered over with the mouse. However, the tooltip of a keyboard-focused villager trade lists only the names of its items, such as "Trade offer: 5 Emerald and 1 Book for 1 Enchanted Book", therefore introducing an inconsistency.

Steps to Reproduce:

  1. Place down a command block and paste the following command inside of it.

    /summon minecraft:villager ~ ~ ~2 {NoAI:1b,VillagerData:{profession:"minecraft:librarian",level:1,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:5},buyB:{id:"minecraft:book",count:1},sell:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:stored_enchantments":{"minecraft:mending":1}}}}]}}
  2. Activate the command block so a villager is spawned.

  3. Open the trading screen of the librarian and move the mouse away from the trade list.

  4. Press the tab key until the trade in the trade list has keyboard focus.

  5. Observe if the tooltip of the trade shows the "Mending" enchantment.

Observed Behavior:

Only the names of the items are shown, so the enchantment of the enchanted book can't be seen.

Expected Behavior:

The full tooltips of the items would be shown, just like with stonecutter recipes.

Attachments

Comments 1

Avoma

Fantastime

Confirmed

Platform HC

Important

Accessibility, Trading, UI

26.4 Snapshot 10

26.4 Pre-Release 3

Retrieved