Mojira Archive
MC-265733

Converting component json to snbt generates invalid output

Converting this json string to a text component and then to snbt generates invalid output.

Input: 

{"translate":"test","with":[1, "2"]} 

Text component toString():

translation{key='test', args=[1, 2]} 

String nbt output of the component:

{translate:"test",with:[{"":1b},{"":"2"}]} 

Exception when trying to parse the output string:

com.mojang.brigadier.exceptions.CommandSyntaxException: Expected key at position 25: ...t",with:[{<--[HERE] 

 
The json string to text conversion was done using ComponentSerialization.CODEC.
The nbt string to nbt conversion was done using TagParser.parseTag().

Invalid

Lennart

2023-10-10, 04:55 PM

2023-10-10, 08:34 PM

2023-10-10, 08:34 PM

0

1

Unconfirmed

(Unassigned)

23w40a

-