The Bug itself
An empty (but also not empty??The String is not simply an empty string??) string will be displayed if a other text type than {"text":"HERE_IS_TEXT"} is used.
Recreating the Bug
Create a scoreboard objective with
/scoreboard objectives add ADummy dummy/scoreboard objectives add ADummy dummyGive yourself a test-value with
/scoreboard players set @p ADummy 1337/scoreboard players set @p ADummy 1337Summon a creeper with
/summon creeper ~ ~ ~ {CustomName:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}/summon creeper ~ ~ ~ {CustomName:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}
In theory this should give the creeper a (displayed) name of "1337". But instead it shows an empty string.
However... If the command
/data get entity @e[limit=1,type=creeper]/data get entity @e[limit=1,type=creeper]is run, you can clearly see, that the value of the name, we typed in when we summoned the creeper, is stil in there which suggests there is something wrong with converting scoreboard objectives into plain-name-text.
(This also happens with an item by typing:
/summon item ~ ~ ~ {Item:{id:"minecraft:torch",Count:1,tag:{display:{Name:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}}}}/summon item ~ ~ ~ {Item:{id:"minecraft:torch",Count:1,tag:{display:{Name:"{\"score\":{\"name\":\"@p\",\"objective\":\"ADummy\"}}"}}}})
Comments 4
Does this also not include Books? Because I tried it and it appered to me, that it does not work in books either, which is a shame. 😞
@@unknown, it should work in books. Could you please provide the command you used to create the book?
The score and selector options are special for only a few places of text components (like tellraw), names are not one of those places.