Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-276713

The behavior of custom_name in potion_contents is inconsistent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 24w37a
    • None
    • Confirmed
    • (Unassigned)

      The custom_name field in the potion_contents item component gives differing results that depends on whether or not the base item is a type of potion.

      Setting custom_name on a non-potion item does not change the displayed name. When not present on a potion item, custom_name behaves exactly the same as setting the custom_name to "empty".

      Steps to reproduce:
      Run these commands: 

      /give @s stick[potion_contents={custom_name:empty}]
      /give @s potion[potion_contents={custom_name:empty}]
      /give @s potion[potion_contents={}]
      

      Expected result:
      The player receives:

      1. A stick visibly named "item.minecraft.stick.effect.empty"
      2. A potion visibly named "Uncraftable Potion"
      3. A potion visibly named "Potion"

      Observed result:
      The player receives:

      1. A stick visibly named "Stick"
      2. A potion visibly named "Uncraftable Potion"
      3. A potion visibly named "Uncraftable Potion"

            Unassigned Unassigned
            18jfisher1 Javitar
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: