Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-267118

Text component argument reads one char more than expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20.2, 1.20.3 Release Candidate 1
    • Java 17
      Windows 11
    • Unconfirmed
    • (Unassigned)

      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
      

            Unassigned Unassigned
            SolidBlock SolidBlock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: