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

Written Books that use Json scores do not update if the book was created after points have been added to a players score.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre4, Minecraft 1.8.2-pre6, Minecraft 1.8.2-pre7, Minecraft 1.8.3, Minecraft 1.8.8, Minecraft 15w39b, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13a
    • Community Consensus

      The bug

      Written Books that use Json scores do not update if the book was created after points have been added to a players score.

      How to reproduce

      Setup dummy scoreboard

      /scoreboard objectives add bug dummy
      /scoreboard objectives setdisplay sidebar bug
      

      Create Book (via command block). The book that will work.

      give @p written_book 1 0 {title:"Bug",author:"Steve",pages:[
      	"{text:'Bug score: ',extra:[
      		{color:red,score:{name:@p,objective:bug}}
      	]}"
      ]}
      

      Read open/read the book you just created.

      Give yourself a point to be added to the scoreboard.

      /scoreboard players add @p bug 1
      

      Create second book (via command block(same command as before)). This book wont work.

      give @p written_book 1 0 {title:"After",author:"Steve",pages:[
      	"{text:'Bug score: ',extra:[
      		{color:red,score:{name:@p,objective:bug}}
      	]}"
      ]}
      

      Read this book.

      Both books will show "Bug score: 1"

      Add more points.

      /scoreboard players add @p bug 5
      

      The first book will now show 6 points.
      The second will only show 1 point.

      If you reset your score the first book will go bank and the second will stay at 1 point.

            Unassigned Unassigned
            lucky lucky
            Votes:
            11 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: