Mojira Archive
MC-96505

"value" key in "score" object for text components does not function

The value key is meant to be used as a priority display instead of a processed score. For example, given the following score:

/scoreboard objectives add TEST dummy
/scoreboard players set @p TEST 1

The following would show "hello" in 1.8, but still shows "1" in 1.9:

/tellraw @a {"score":{"name":"@p","objective":"TEST","value":"hello"}}

/title @a title {"score":{"name":"@p","objective":"TEST","value":"hello"}}

/setblock ~ ~1 ~ standing_sign 0 replace {Text1:"{\"score\":{\"name\":\"@p\",\"objective\":\"TEST\",\"value\":\"hello\"}}",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[\"\"]"}

/give @p written_book 1 0 {title:"",author:"",resolved:0b,pages:["{\"score\":{\"name\":\"@p\",\"objective\":\"TEST\",\"value\":\"hello\"}}"]}

In 1.9, the book sets value as the player's processed score, overwriting the original value of "hello", and at that point it does work as the priority display. As such, setting resolved to 1 does allow it to work based on my input in 1.9, but it's a feature only available for books (and in 1.8, resolved can be 0 and my inserted value takes precedence):

/give @p written_book 1 0 {title:"",author:"",resolved:1b,pages:["{\"score\":{\"name\":\"@p\",\"objective\":\"TEST\",\"value\":\"hello\"}}"]}

This is likely related to the issue described in MC-88957.