mojira.dev
MC-276327

The item_name component no longer overrides potion names

The item_name component no longer overrides the name of a potion. This is the case regardless of the type of potion and any effects it may have. The custom_name component seems to work just fine.

Attachments

Comments 4

This was actually not fixed. It's impossible to give a potion that grants effects with a custom item_name; only "item.minecraft.<id>.effect.<string>" translation keys can be used.
Expected would be that if the potion and custom_name field in potion_contents are not set, item_name would be used. Currently the item_name is only used when potion_contents is removed from the item.

Doesn't work:

/give @s potion[potion_contents={custom_effects:[{id:"weakness",duration:2}]},item_name='{"text":"Test"}']

Works:

give @s potion[!potion_contents,item_name='{"text":"Test"}']

This needs reopening, it wasn't fixed.

As I said in my previous comment, even if you don't provide potion nor custom_name in potion_contents, the item name is not used. The expected behavior would be that item_name gets used when those 2 fields are absent.

The version claimed to have fixed this did nothing to correct the reported behavior.

The changelog for 24w37a specified that minecraft:item_name has lowest priority, so this issue is no longer valid and can't be reopened.

Even when you don't provide the potion, nor the custom_name fields? I'd expect that only when one of those is set that the name is changed, not whenever the component exists altogether.

It is impossible to give a potion with a name of another item that does not show in item frames now, unlike every other item/component.

Squid Eevee

boq

Confirmed

Platform

Important

Commands, Items

24w36a

24w37a

Retrieved