I'm trying to summon a potion item with a custom name. I did use
/summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:potion",Count:1b},display:{Name:'{"text":"Teleporter","italic":"false"}'},PickupDelay:8}But it doesn't have the name I want. It has the normal uncraftable potion name.
Does anyone know how to fix it? I'm on Java 1.18.1.
51 Answer
The display key has to be under both the Item key and another key called tag. The full command would look like this:
/summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:potion",Count:1b,tag:{display:{Name:'{"text":"Teleporter","italic":"false"}'}}},PickupDelay:8}The minecraft wiki has information on the entity data structure of items here.