Mojira Archive
MC-272694

In certain instances, selecting an item with an identical name string doesn't trigger the appearance of the held item tooltip

Relates to MC-130145. Version 1.4.6 introduced a feature: changing the item in the mainhand triggers the display of the item's name above the hotbar, provided it differs from the previously held item. (Note: This function is independent of changing the selected hotbar slot.) However, if the item name string remains unchanged but varies in color or italicization, there are instances where the name doesn't appear as expected.

The following cases cause the item's name to appear as expected:

  • Switching between an item renamed to its default name and an unrenamed item of the same type: Switching from the item
    /give @p furnace_minecart[custom_name='{"text":"Minecart with Furnace"}'] 1

    to

    /give @p furnace_minecart

    (One item name is italic, while the other name isn't, therefore the appearance of the name is expected)
    This likely occurs because one item's name is a translation key, while the other is plain text.

The following cases do not cause the item's name to appear:

  • Switching between items with identical name strings, where one is renamed using the custom_name component and the other using the item_name component. Since one item's name is italicized and the other is not, the name should appear.
  • Switching between items with identical names but different rarities. Due to the color difference, the name should appear to inform the player that they are now holding an item of a different rarity.
  • Switching between items with identical names, where one is enchanted and the other is not. Since one name is blue and the other is not, the item name should appear.

Steps to reproduce (custom_name <-> item_name)

  1. /give @s furnace_minecart[custom_name='{"text":"a"}'] 1
  2. /give @p furnace_minecart[item_name='{"text":"a"}'] 1
  3. Switch between the 2 items in your hotbar

Observed Result: Switching between the items doesn't trigger the appearance of the name. The name disappears after a few seconds, even when repeatedly switching between the two items.
Expected Result: Since one item's name is italicized and the other's is not, the item name should reappear every time you switch.

Steps to reproduce (rarities)

  1. /give @s minecraft:dirt[minecraft:rarity=common]
  2. /give @s minecraft:dirt[minecraft:rarity=uncommon]
  3. /give @s minecraft:dirt[minecraft:rarity=rare]
  4. /give @s minecraft:dirt[minecraft:rarity=epic]
  5. Switch between the 4 items in your hotbar

Observed Result: The item name disappears after a few seconds and doesn't reappear each time you switch between the different dirt blocks.
Expected Result: Since the names have different colors, the item name should reappear every time you switch.

Steps to reproduce (enchanted <-> unenchanted)

  1. /give @s diamond_sword 1
  2. /give @s diamond_sword[enchantments={levels:{"minecraft:sharpness":1}}] 1
  3. Switch between the 2 items in your hotbar

Observed Result: The item name disappears after a few seconds and doesn't reappear each time you switch.
Expected Result: Since one item's name is blue and the other is white, the name should reappear every time you switch.

Unresolved

No User

The grandpa of minecraft

2024-05-30, 09:37 PM

2024-07-12, 07:16 AM

0

0

Plausible

Low

Platform

Items, Text

1.20.6, 1.21 Pre-Release 1

-