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

Score text components do not work with entity UUIDs and do not print same selector errors like other commands

XMLWordPrintable

    • Confirmed
    • (Unassigned)

      The bug

      Score text components do not work with entity UUIDs and do not print the same error messages if multiple entities match a selector.

      How to reproduce

      Different error message

      See also MC-113962

      1. Use the following command containing a score component
        /tellraw @p {"score":{"objective":"","name":"@e"}}
        

        → It prints "Selector '@e' found nothing"

      2. Use a different command which allows only one entity
        /tp @p @e
        

        → It prints "Entity '@e' cannot be found"

      Entity UUID not working

      1. Use the following command to create an scoreboard objective
        /scoreboard objectives add test dummy
        
      2. Summon an entity with a defined UUID
        /summon armor_stand ~ ~ ~ {UUID:[I;0,0,0,0]}
        
      3. Set a score for the entity; you can use the UUID to identify the entity if you want to
        /scoreboard players set 0-0-0-0-0 test 1
        
      4. Use a command with a score component
        /tellraw @p {"score":{"objective":"test","name":"0-0-0-0-0"}}
        

        → It does not print the score

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.util.text.TextComponentUtils.processComponent(ICommandSender, ITextComponent, Entity) does not use the method net.minecraft.command.CommandBase.getEntity(MinecraftServer, ICommandSender, String), instead it partwise implements the behavior of this method itself.

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: