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

Narrator reads scoreboard team color codes in player names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w01a
    • Minecraft 17w13a, Minecraft 17w13b, Minecraft 17w14a, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17b, Minecraft 17w18a, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 3, Minecraft 1.12 Pre-Release 4, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12, Minecraft 17w31a, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a
    • Windows 10 Pro 64-Bit (10.0, Build 15063)
    • Confirmed

      The bug

      The new narrator feature reads the §-based formatting codes generated by the scoreboard (see MC-112693).

      To reproduce:

      1. Leave your current scoreboard team, and create a new empty one (needed to ensure that residual naming properties are not left).
      2. Enable narrator.
      3. Paste a copypasta; it will be read with your name as normal.
      4. Set a color onto the team; the specific one doesn't matter (it can even be reset, and the bug will still happen). Numeric colors such as blue work best.
      5. Paste the copypasta. Your name will be read with surrounding color codes, for instance, "9 pokechu r".

      As a series of chat messages/commands:

      /scoreboard teams leave @p
      /scoreboard teams add test_team
      /scoreboard teams join test_team @p
      Did you ever hear the tragedy of Darth Markus the wise? I thought not. It's not a story Microsoft would tell you. It's a Mojang legend. Darth Markus was a Minecraft developer of Mojang, so powerful and so wise he could use Java to influence the entity data to create life.
      /scoreboard teams option test_team color blue
      Did you ever hear the tragedy of Darth Markus the wise? I thought not. It's not a story Microsoft would tell you. It's a Mojang legend. Darth Markus was a Minecraft developer of Mojang, so powerful and so wise he could use Java to influence the entity data to create life.
      

      Cause

      Probably, narrator is implemented using the component's raw text (mcp calls it getUnformattedText. However, due to MC-112693, format codes can still be put into that text, meaning that narrator would receive a string starting with "<§9pokechu22§r>", and diligently read that.

      Possible fixes

      The ideal fix for this issue would be to fix MC-112693. Alternatively, the narrator library could strip out §-based color codes, as it already does with < and >.

      Demos

      Here's what it's like without a team color:

      WithoutColor.mp3

      ... and with a team color:

      WithColor.mp3

        1. WithColor.mp3
          545 kB
          [Mod] Pokechu22
        2. WithoutColor.mp3
          582 kB
          [Mod] Pokechu22

            ProfMobius ProfMobius (Thomas Guimbretiere)
            pokechu22 [Mod] Pokechu22
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: