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

Narrator improperly narrates chat

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 22w16b
    • 22w17a
    • None
    • Confirmed
    • Accessibility
    • Important

    Description

      Chat messages have two translations, one for display and one for narration:

      {
          "chat.type.text": "<%s> %s",
          "chat.type.text.narrate": "%s says %s"
      }
      

      Due to the text refactor in 22w16a, only the display text is used for both display and narration. In particular, the narrator says "author message" instead of "author says message".

      This is caused by Minecraft checking whether the text itself is translatable, when due to the new class hierarchy, only the content can be translatable. Specifically (Yarn mappings:

      public static Text replaceTranslationKey(Text text, String oldKey, String newKey) {
          if (text instanceof TranslatableTextContent && oldKey.equals(// ...
          }
      }
      

      Attachments

        Activity

          People

            boq [Mojang] Bartosz Bok
            haykam haykam
            Votes:
            7 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: