can't spawn a textbook
PSILONCRAFT opened this issue · 23 comments
when i user the /give @p gbook:guidebook 1 0 {Book:"gbook:xml/test.xml"}
i get a book but i get the an unknown error occur
I have the following file setup
/config/books in there there are the folder books and books.json with the entry
[ «gbook:books/rules.xml», «gbook:books/demobook.xml», «gbook:books/test.xml» ]
what is wrong here
your give command says "xml/test.xml", but your books.json has "books/test.xml" ;P
note that you don't need a books.json for books placed inside config/books, they are available without one.
/give @p gbook:guidebook 1 0 {Book:"books/test.xml"} still gives an error i get a book but can't open it
try to use just "test.xml", if you say "books/test.xml" it will search for the book in "config/books/books/test.xml" :P
tried /give @p gbook:guidebook 1 0 {gbook:"/test.xml"} stil get a book but can't open it
I have a folder inside configs that i called books and in there there are a new folder named books that have the xml files
Oh I see your issue! It's meant to be: /give @p gbook:guidebook 1 0 {Book:"test.xml"}
Wait no, I'm tired, sorry: /give @p gbook:guidebook 1 0 {Book:"gbook:books/test.xml"}
is there something wring with the json file
[ "gbook:books/demobook.xml","gbook:books/rules.xml", "gbook:books/test.xml" ]
Wait, you just mentioned a server. Are you trying to put the books in the server? That won't work. There's nothing in the mod for sending books from the server to the client -- they have to be provided in the clients already, for them to work at all.
ok that makes more sense. thanks for helping out man. Nice work on the mod thanks a lot
Yep. Sorry for the confusion.
I could possibly implement a system where the book data is transferred from the server to the client, but even in that case, it would only be xml data, images have to be available during launch.
spoke to soon here sorry. added it to the config at the client and i stil can't open the book after it popps in the toolbar
I'm running this xml file
<include ref="gbook:xml/standard.xml" />
<chapter>
<page>
<p>Left</p>
<p align="center">Center</p>
<p align="right">Right</p>
<title>Title</title>
<p bold="true">Bold</p>
<p italics="true">Italics</p>
<p underline="true">Underline</p>
<p color="#306090">Colored</p>
<p bold="true" italics="true" underline="true" color="#123456" align="center">All the Formats</p>
<apace height="20" />
<p space="20">A</p>
<p>B</p>
<space height="25%" />
<p>C</p>
<p indent="60">D</p>
</page>
<page>
<p>Page 2</p>
<link ref="chapter2">Click me</link>
</page>
</chapter>
<chapter id="chapter2">
<page>
<title>Chapter 2</title>
<big_recipe>
<stack item="minecraft:iron_ingot"/>
<stack item="minecraft:iron_ingot"/>
<stack item="minecraft:iron_ingot"/>
<space/>
<stack item="minecraft:stick"/>
<space/>
<space/>
<stack item="minecraft:stick"/>
<space/>
<stack item="minecraft:iron_pickaxe"/>
</big_recipe>
<small_recipe>
<stack item="minecraft:quartz"/>
<stack item="minecraft:quartz"/>
<stack item="minecraft:quartz"/>
<stack item="minecraft:quartz"/>
<stack item="minecraft:quartz_block"/>
</small_recipe>
</page>
</chapter>
That is not a valid book file.
You want it to look like:
<book>
<chapter>
<page>
<p>Test</p>
</page>
</chapter>
</book>
As you can see, the top-level tag has to be <book>
.
Is there live update when i edit the book or do i need to restart the game for every change. Is there a refresh command for the xml files??