Mojira Archive
MC-276713

The behavior of custom_name in potion_contents is inconsistent

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"

Invalid

Javitar

2024-09-14, 08:59 PM

2024-09-20, 07:23 AM

2024-09-20, 07:23 AM

3

4

Confirmed

(Unassigned)

24w37a

-