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

The track output characters within command blocks are untranslatable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.18.1, 1.18.2 Release Candidate 1
    • None
    • Confirmed
    • (Unassigned)

      The Bug:

      The "X" and "O" characters used for the track output button within the command block are untranslatable and are missing translation keys.

      Steps to Reproduce:

      • Attempt to search for the existence of the string "X" by using this search filter, and the existence of the string "O" using this search filter, on the official Minecraft crowdin project.
      • Take note as to whether or not the track output characters within command blocks are untranslatable.

      Observed Behavior:

      The track output characters within command blocks are untranslatable.

      Expected Behavior:

      The track output characters within command blocks would be translatable.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.

      net.minecraft.client.gui.screens.inventory.AbstractCommandBlockEditScreen.java
      public abstract class AbstractCommandBlockEditScreen extends Screen {
         ...
         protected void init() {
            ...
            this.outputButton = this.addRenderableWidget(CycleButton.booleanBuilder(new TextComponent("O"), new TextComponent("X")).withInitialValue(flag).displayOnlyValue().create(this.width / 2 + 150 - 20, this.getPreviousY(), 20, 20, new TranslatableComponent("advMode.trackOutput"), (p_169596_, p_169597_) -> {
               ...

      If we look at the above class, we can see that the track output characters within command blocks are hardcoded, and as a result, are untranslatable. This is evident through the following piece of code:

      (new TextComponent("O"), new TextComponent("X"))

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: