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

Command Block Shows Command with JSON Content as valid while it's invalid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.4
    • None
    • Unconfirmed
    • (Unassigned)

      I add this as a result from this task:

      https://bugs.mojang.com/browse/MC-267619

       

      I faced the problem and cared about your advice about this being a result of stricter json.

      Howeer, if so, I would expect the command block to show the command as invalid.

       

      Here's an example:

      /give @p written_book{pages:['{"text":"Page 1","clickEvent":{"action":"change_page","value":2}}','\{"text":"Page 2"}'],title:Test,author:Test} 

      This command is valid in 1.20.2 and invalid 1.20.4 due to "value":2

      In the command block of 1.20.4, it's shown as valid.

      However, the command result in an invalid book, this here is the correct one:

      /give @p written_book{pages:['{"text":"Page 1","clickEvent":{"action":"change_page","value":"2"}}','\{"text":"Page 2"}'],title:Test,author:Test} 

      So the bug: If the JSON parse for books is strict, invalid JSON strings should be shown as invalid in command blocks.

            Unassigned Unassigned
            LordRazen LordRazen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: