Talia-12 / MoreIotas

An addon for Hex Casting, adding new types of iotas such as Strings.
MIT License
1 stars 7 forks source link

[Suggestion] Escape Characters in String Iota NBT Representation #22

Open Master-Bw3 opened 10 months ago

Master-Bw3 commented 10 months ago

Line breaks are represented as a literal newline character in NBT, making it impossible to represent strings containing line breaks in commands since SNBT doesn't support \n.

It would make much more sense to represent strings in the same way as other text-containing items like written books, which escape characters like newlines and \ in their nbt.

how string iotas represent a string containing a line break:

{"hexcasting:type": "moreiotas:string", "hexcasting:data": "
"}

how written books represent a string containing a line break:

'{"text":"\\n"}'