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

Translatable component argument boolean serialization mismatch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.20.4, 23w51b
    • None
    • Confirmed
    • Commands, Text

      This command outputs different text in singleplayer vs. multiplayer. On singleplayer, you get a "true hey" message in chat while on multiplayer you get a "1 hey" message in chat.

      /tellraw @s {"translate":"%s %s","with":[true, "hey"]}
      

      This is caused by the serialization process for components using nbt now which does not preserve boolean information. When the component is serialized to NBT the arguments ("with") becomes

      [{"":1b},{"":"hey"}]
      

      and when the client deserializes that, it reads the 1b as a numeric 1 byte which is then displayed as a 1.

            Unassigned Unassigned
            Machine Maker Jake Potrebic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: