in tellraw, \n is considered as an Invalid escape sequence, so it's no longer possible to include newlines in text component commands.
I used this command:
/tellraw @a {"text":"\n Text","color":"gray"}
\t also no longer works
Linked issues
is duplicated by 3
Attachments
Comments 7
25w02a Updated data format of Text Components.
Changelog says:
Text Components are no longer stored as JSON wrapped by a string
The format itself is the same as before, but inlined directly into the outer structure
For example, the item component
minecraft:custom_name="{\"text\":\"Renamed item\"}"
will becomeminecraft:custom_name={text:'Renamed item'
}This includes Text Components passed as arguments to commands such as
/tellraw
or/title
For example,
/tellraw @s "\"text\":\"Hello world\""
may become/tellraw @s {text:'Hello world'
}
Note: in the case where Text Components are embedded in NBT, no distinction exists between boolean and integer types
To pass boolean arguments to translations, you must use the string form
For Text Components with the
nbt
type andinterpret
set totrue
, Text Components will be parsed from the given NBT directly rather than converting to string and parsing as JSONThe format of hover and click events has been updated
Xfrtrex, if you're quoting the changelog because of the quoted keys, that's valid in SNBT as well. Nothing in your quote concerns the issue of the newline not working.
This should really be fixed, it's breaking a lot of tellraw usages in my datapacks (not that they weren't already broken because of hoverEvent being changed to hover_event and clickEvent being changed to click_event) because of \n and removing all of the \n usages makes them look very ugly in-game, especially hover text.
This has broken all my book creation commands as well. It's pretty hard to make a valid book (with a command) without newlines.
Definitely caused by the change from JSON to SNBT.