Mojira Archive
MC-267118

Text component argument reads one char more than expected

Reproduced in 1.19.4, 1.20.2 and 1.20.3-rc1.
Text component argument (those in /tellraw and /title) reads the string one char more than excpeted. In other words, the cursor of StringReader after the json is one character after expected.
The issue is not obvious as text components are often used as the last argument of commands.

How to reproduce
Add an extra char after the json, and it can parse normally:

/tellraw @s {"text":"example"}a

/title @s title {"text":"example"}a

/scoreboard objectives add example dummy {"text":"example"}a

Duplicate

SolidBlock

2023-12-01, 04:13 AM

2024-04-08, 06:05 AM

2023-12-01, 02:58 PM

0

2

Unconfirmed

(Unassigned)

command, json, parsing, text-component

1.20.2, 1.20.3 Release Candidate 1

-