Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-96505

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 16w04a, Minecraft 16w05a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 3, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w43a
    • None
    • Confirmed

      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.

            Unassigned Unassigned
            skylinerw [Mod] Skylinerw
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: