mojira.dev
MC-269215

Raw JSON Text cannot be parsed in an Item Component when in /tellraw format

Typing in the tag /give @s minecraft:trial_key[minecraft:custom_name=\\{"text":"Big Trial Key", "color": "dark_purple", "font": "minecraft:alt"}] like you would in the /tellraw command will throw this error:

Malformed 'minecraft:custom_name' component: 'java.io.EOFException: End of input at line 1 column 3 path $.'

 However, typing in the same tag in Data Pack format works perfectly:

{   \"text\": \"Big Trial Key\",   \"color\": \"dark_purple\",   \"font\": \"minecraft:alt\" }

Comments 1

Invalid. The text component in the custom_name component is a string containing the JSON, so the correct command looks like this:

/give @s minecraft:trial_key[minecraft:custom_name='{"text":"Big Trial Key", "color": "dark_purple", "font": "minecraft:alt"}']

or

/give @s minecraft:trial_key[minecraft:custom_name="{\"text\":\"Big Trial Key\", \"color\": \"dark_purple\", \"font\": \"minecraft:alt\"}"]

FarestR06

(Unassigned)

Unconfirmed

(Unassigned)

24w10a

Retrieved