mojira.dev
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"

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Javitar

(Unassigned)

Confirmed

(Unassigned)

24w37a

Retrieved