Fixing Etho's Comment of the Day Books
Many episodes ago, Etho discovered that all of his old Comment of the Day books were corrupted, only containing a single word on each page, seemingly due to a change in one of the snapshots he ran.
Out of curiosity, I ran the latest world download through an NBT decoder (which I wrote about a year ago), and I discovered why: all of the old books had their pages stored as raw strings rather than JSON, though for most of them the original text was still intact. Sadly, the few books that Etho picked up and examined were irreversibly corrupted because doing so made the game convert them to JSON (and only store the first word).
So, I wrote a program to find and fix all of those broken books (all located within r.-1.0.mca and r.-2.0.mca), and it was able to recover 190 comment books (from episodes 204 thru 352); 12 comment books were unrecoverable (from episodes 204, 208, 279, 281, 286, 287, 294, 295, 310, and 324), and a few other books were also corrupted ("Pet Project Plan", "The Left Choice", and "The Right Choice").
I've uploaded the program to https://www.qmtpro.com/~quietust/misc/fix_minecraft_books.zip - hopefully Etho sees this post so he can potentially make use of it.
Archive contents (with SHA-256 hashes for verification):
763c30a0d6420f6260933d40ed7702341ddc97bd6311943985fe94476daf6f43fix_books.exe (64-bit Windows CLI executable)fe38dca8ea17396c62c487d5576fda03a20c31f305a417d1a3a18fbeaae27016fix_books.cpp (source code)4ac0f30b1257652d2ae27ef553ec9dc749bbd0773fdba877c48a3c7e144c9fcdnbt.h (source code)
Posted Sep 7, 2020, 4:42 PM UTC · edited