mojira.dev
MC-123807

Item, entity, block, team, and objective display names must be valid JSON text components

Mod Notice

Name, CustomName, Lore, and team/objective display names use JSON text components now, just like /tellraw and /title. The format changed a bit, but you can use colors, formatting, and translations now.

1.12

/summon cow ~ ~ ~ {CustomName:"example"}
/team add example Example

1.13+

/summon cow ~ ~ ~ {CustomName:"{\"text\":\"example\"}"}
/team add example "Example"

Linked issues

MC-123797 Armor Stand Wont allow data tags Resolved MC-123826 Renaming entities using commands doesn't work Resolved MC-123920 Unable to summon named entities! Resolved MC-123981 NBT CustomName seems to only accept integers Resolved MC-124023 The tag {CustomName:"name"} causes all summon commands to fail. Resolved

Comments 7

Names are JSON components now; use CustomName:"\"test\""

Next time, just read the blog post 🙂
https://minecraft.net/article/minecraft-snapshot-18w01a

Technical: Changed all custom names (blocks, items, entities, block entities) to translatable text components

How would I query for those custom names?
Because

@e[name=Test"]

doesn't work anymore

Giving item with lore still works the same though. Like this: /give @a minecraft:stick{display:{Lore:["a powerful stick"]}} 1. That doesn't require JSON format. So I was just wondering if this is a bug or not?

They are currently not json strings, see MC-123772.

Lex305

(Unassigned)

Unconfirmed

CustomName

Minecraft 18w01a

Retrieved