Resolution: Works As Intended
Affects Version/s: Minecraft 1.13-pre1
Fix Version/s: None
Technically it's valid JSON, but the problem is that it doesn't seem to be able to grab a score from the scoreboard. My idea is that I was thinking it'd be neat if you could have a number variable for something like RPG levels displayed alongside a name. For example, the following command should work for this, but doesn't:
For the record, this functionally identical one doesn't either:
This just summons a husk named "Level " with nothing at the end of it instead of a number equal to my "rpglevel" score. Using my actual player name or a fake player name (or even @p) doesn't change this fact.
Looking at its data through "/data get" shows that the "value" argument gets added to the "score" section, but it'll always be empty by default. You can manually set the value to whatever you want it to be and it'll show up in the name, but the expected behaviour in this context is that "value" should be automatically determined upon running the command. Otherwise it's no different than having another "text" section.
I dunno how difficult it is to implement, but the simplest-sounding solution would be adding what I just described in that last bit: A way for the game to grab a score and automatically apply it to the "value" section of a CustomName's "score" component upon running the command instead of always leaving it blank like it currently does. Maybe the problem is that it's not properly recognizing the "name" section of "score" when used in CustomName? Because the entity data shows that it uses the literal text when writing things like @s, @p, etc.. Thinking about it that way, maybe it's best if CustomName just immediately converts "score" components into "text" ones that match up with what the "value" would have been? I imagine one of the potential drawbacks of doing it the other way is a custom name that'd be endlessly checking itself for score updates (maybe this is a main reason why it's not already in the game), whereas immediately converting a "score" component into a "text" one wouldn't have that issue.