mojira.dev
MC-263143

NBT interpret is not working properly with quotation mark

Interpreted array containing <"> (quotation mark) in any configuration

always results in empty line. 

 

How to reproduce:

-create array in storage containing <"> (quotation mark) in any configuration

// examples
/data modify storage test arr set value ["a", "b\\\"", "c", "!"]
/data modify storage test arr set value ["a", "\"", "c", "!"] 
/data modify storage test arr set value ['"']
/data modify storage test arr set value ["\"\\\"\""]

 

-assign this array to sign with interpret flag 

// copy storage array content as string onto sign
/data modify block x y z front_text.messages[0] set value '{"extra":[{"nbt":"arr","storage":"test","interpret":true}],"text":""}'

 

results (for front_text.messages[0]):

'{"extra":[{"text":""}],"text":""}'

expected:

'{"extra":[{"extra":[{"text":"b\\""},{"text":"c"},{"text":"!"}],"text":"a"}],"text":""}'

 

Attachments

Comments 1

Interpreting is only supported for string NBT, not lists. Lists of strings get re-formatted to invalid json.

Michał

(Unassigned)

Unconfirmed

(Unassigned)

1.20 Release Candidate 1

Retrieved