Score text components do not work with entity UUIDs and do not print same selector errors like other commands
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.
2017-02-18, 08:01 PM
2020-08-19, 10:27 PM
2020-08-19, 10:27 PM
3
5
JSON, UUID, command, entity, score, scoreboard, selector, tellraw, text, title
Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 18w03b
-