Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-162083

Titleraw text shadows do not appear correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • 1.19.22 Hotfix
    • None
    • Unconfirmed
    • Windows

      Creating a title with the new line character & formatted colors causes the text shadows to appear incorrectly for subsequent lines.

      To reproduce this bug, create a file en_US.lang in your resource pack & create the translation key:
      title.test.sampletext=§4This is line 1.%1This is line 2!

      Add the resource pack to a world & run this command:

      /titleraw @a title {"rawtext":[{"translate":"title.test.sampletext","with":["\n"]}]}

      Instead of the text shadow being consistent between these two lines, they appear differently. This affects map creators. There is probably an easier way to reproduce this issue, but this is how I encountered the bug.
      For context, the translation string before the new line character has a shadow color of #2A0000, appropriate for the chosen §4 color code. After the new line, the game chooses #404040, which is the default shadow for uncolored text.

      The reason this bug is significant is because title text does not wrap around. Its size is set & translation strings that work with English may be too long in other languages. A new line is necessary to fit more words. The 8 short words in the example string don't fit on a 1080p monitor with GUI scale 0 without a break. Marketplace content should work the same for all devices with default settings without text being hard to read.

      I found a workaround: Explicitly redefining the color of subsequent new lines, such as in the example below, allows the game to correctly color the text's shadows.
      title.test.sampletext=§4This line is red.%1§4This one is too!

        1. 2022-09-09.png
          1.28 MB
          Douglas F Correa

            DeeFeeCee Douglas F Correa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: