mojira.dev
MC-123869

Display Name NBT Crash

The bug

When you give yourself an item with the display tag with custom name, such as
/give @s minecraft:pumpkin{display:{Name:"ItemName"}}
the game crashes instantly and on the crash report the following error appears:

Description: Unexpected error

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path

Also, the world gets corrupted and it crashes when you try to play it.

Linked issues

Comments 4

Your command is incorrect.

Try

/give @s minecraft:pumpkin{display:{Name:"\"ItemName\""}}

Why is this command incorrect? It worked like that in previous versions.
Even if it's incorrect, the game shouldn't crash, but recognize the error when typing in the command.

NBT changes, display.Name and CustomName needs to be valid json strings as of 18w01a, the crashing is fixed for next snapshot though: MC-123782

Thanks for your response 🙂

ValentiMS

(Unassigned)

Unconfirmed

crash

Minecraft 18w01a

Retrieved