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

Reset formatting codes (§r) in MOTDs continue format used in previous line

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.2
    • None
    • Confirmed
    • UI
    • Low
    • Platform

      If a §r (reset) formatting code is used in an MOTD anywhere after a line break, it will change the format to the one used in the previous line instead of resetting.

      Example:

      \u00A7c\u00A7lLine 1\n\u00A76Line \u00A7r2

      The expected result would be the text "Line 1" in red (§c) and bold (§l) in the first line, and the text "Line 2" on the second line of the MOTD. Since it is preceded by a §r formatting code, the number 2 should have the default gray color and no text decorations.

      In reality, all text following the §r code in the second line uses the formatting that was used at the end of the first line:

      This makes it impossible to reset back to default formatting if any formatting was used at the end of the first line.

      It looks like this issue exists in all versions since 1.16.

      A workaround is to add a §r code at the end of the first line before the line break, so that the first line ends on the default formatting.

       

            Unassigned Unassigned
            KurtThiemann Kurt Thiemann
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: