I'm back... trying to figure out why Minecraft will not use book code... I'm pretty sure that Mojang has a bug in their game, which is preventing this from working, but who knows... maybe someone else is able to figure this out. I've been trying to create a NPC to trade a written book for ages, however, it seems that text inside of written books is broken. Take the following code below...
Yeppers... still unable to get PAGES working. I've had this problem not only with trying to get PAGES to work on a written book for NPC trades, but I've also had this problem trying to TESTFOR a written book with PAGES. Author and Title seem to work just fine, and PAGES, from what I've read, should work... at least, it was my understanding they would... so for whatever reason, they will not.
I've also tried this with the included JSON format escaping quotations "TEXT":"(your text)", but that didn't seem to work either. I've tried a few variations, from sources I've found around the web, but none have seemed to work. I'm not really a coder, so am at a loss when what little legit documentation I find doesn't work. hehe
@AbsentFuture, btw, I did test that code in reverse order for BUY/SELL. If it is reversed, I am able to sell 1 stone for 1 written book with "test" written inside of it... perfect... and am able to sell that book I purchased back, and buy 1 stone if I re-reverse that order back to the original.... so.... what is the appropriate text code for PAGES? I've tried a lot of variations but cannot seem to find the exact one which is used.
I looked up the NBT data, and for some reason, when the NPC sells me the written book, it has Pages: "text" but when I have a book and quill which I do myself and create a written book, it has Pages: ""text"" with double quotations... I'm not sure why and not quite sure what code is needed to fix it.
For some reason, it doesn't. Looks perfectly fine to me, but there must be something off....
This this above code, it cannot be reversed, like the other one can... I can buy a book with "test" written inside of it for 1 stone, however, if I change around BUY/SELL and try to sell that same book back for 1 stone, the NPC will not accept the book.
Same exact code but obfuscated. Seems I'm back to square one again. Breaks it yet again. I'm glad Mojang has made their code so "easy" to use in Vanilla... where you only need to sit for 3 or 4 days trying to find out a way to make it work. lol
I just find it interesting that the NPC will sell the book just fine, it works as it is suppose to... however, take the exact same code, flip-flop it, and the NPC will not buy the book back they just sold you... +1 to Mojang!
Oh, and still only able to sell books back to NPC (when it's working) that I've bought from the NPC. Whenever I write/sign my own book, it totally does not work... Not sure what is so different about the tags.
Nope... not having luck with that either... I've been trying to find a way to make it recognize only pages for a long time now, without the need for title/author... haven't had much luck with books, if you've not been able to tell yet. haha ;p
Anyways, I'm working around Mojangs crap heh. Wasted enough time trying to figure out something which seems like it would work. Would love to at least be able to clear written books containing certain text on a page, with no title,author, but don't think that is ever gonna happen either. *sigh*
Very awesome! Again, thanks a bunch for the help AbsentFuture, you're great! I actually tried the ["\"test\""] for the CLEAR, but had the other values wrong, but didn't try that format on the NPC haha. ^-^
Good stuff. So that's the format, eh... not quite sure why it's enclosed in double quotations, but meh...