How do I summon an item with a custom name?



  • 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.



  • 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 https://minecraft.fandom.com/wiki/Entity_format#Items_and_XP_Orbs .




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2