Written Books that use Json scores do not update if the book was created after points have been added to a players score.
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.
2015-01-24, 12:33 PM
2020-06-26, 06:34 PM
2020-06-26, 02:05 PM
11
9
JSON, book, nbt-tags, written, written-book
-