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
Use the following command containing a score component
/tellraw @p {"score":{"objective":"","name":"@e"}}
→ It prints "Selector '@e' found nothing"
Use a different command which allows only one entity
/tp @p @e
→ It prints "Entity '@e' cannot be found"
Entity UUID not working
Use the following command to create an scoreboard objective
/scoreboard objectives add test dummy
Summon an entity with a defined UUID
/summon armor_stand ~ ~ ~ {UUID:[I;0,0,0,0]}
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
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.
Linked issues
Comments 3
First part is fixed now (both have "only one entity is allowed, but the provided selector allows more than one" message)
Second part I think we're using MC-129608 for
Can confirm the second part of the bug (UUIDs not working) for 1.16.1.
The command
/tp @p @e
now gives the error message "Incorrect argument for command at position 7: /tp @s <--[HERE]".The command
/tellraw @p {"score":{"objective":"","name":"@e"
}} gives the error message "Only one entity is allowed, but the provided selector allows more than one".I think the issue should be updated.