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

Sign json with nonexistent entity score selectors cause random nearby tile entities to become invisible

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.11.2, Minecraft 17w15a, Minecraft 1.12 Pre-Release 2, Minecraft 1.12
    • Fix Version/s: Minecraft 1.13.1
    • Confirmation Status:
      Confirmed

      Description

      The bug

      Having a sign displaying a score of a nonexistent entity will cause the sign to corrupt random nearby tile entities and make them invisible when the user exits and reenters the world.

      How to reproduce

      1. Place multiple signs with text on them, and other various tile entities
      2. Run the following command on any sign:
        /blockdata X Y Z {Text3:"{\"score\":{\"objective\":\"a\",\"name\":\"@e[name=Error]\"}}"}
        1.13: /data merge block X Y Z {Text3:"{\"score\":{\"objective\":\"a\",\"name\":\"@e[name=Error]\"}}"}
      3. Exit and reenter the world to see multiple tile entities have become invisible

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The problem is that the client tries to process the score component by calling the method net.minecraft.util.text.TextComponentUtils.processComponent(ICommandSender, ITextComponent, Entity). This method should only be called by the server because the client has no access to the scoreboard or all entities.

      This could also be fixed by replacing a processed score component with a text component containing the score.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              onnowhere Onnowhere
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: