1

[1.12.2][Win10] trying to create an in-game manual using Guidebook mod, but stuck at FileNotFoundException

barrowisp's Avatar barrowisp1/28/19 10:36 pm history
1 emeralds 730 3
1/29/2019 11:49 pm
Acier's Avatar Acier
Hi folks,

My main wish with Minecraft involves being able to add/revise an in-game manual for things like recipes so a player can reference at least some things without consulting a wiki (y'know, more immersive). I found a mod that purports to do just that, but I'm having trouble implementing its instructions as currently written.


With the help of Google, I think I've created a decent start to an xml 'book' but it's not yet loading in-game. I suspect that my problem is related to “declaring the book.”
I would appreciate PMCers' help figuring out precisely where each file needs to be pasted and referenced. I think I'll create separate sections with details of the process/problem. In your responses, please assume that I do not know which files are referenced (except the .minecraft folder). I’m still not entirely clear on which files go in \.minecraft\resourcepacks, which in \.minecraft\config, and so on. Also keep in mind that this is my first attempt at xml, and I will likely not understand terms other than those that appear in gigaherz’s guidebook. Thank you!
Posted by barrowisp's Avatar
barrowisp
Level 27 : Expert Explorer
35

Create an account or sign in to comment.

3

2
01/29/2019 11:49 pm
Level 52 : Grandmaster Professor
Acier
Acier's Avatar
6_28
1
01/28/2019 10:52 pmhistory
Level 27 : Expert Explorer
barrowisp
barrowisp's Avatar
I downloaded Guidebook version 2.8.3 (for game version 1.12.2) from https://www.curseforge.com/minecraft/mc-mods/guidebook
No API or other dependencies are listed.

I examined the contents of Guidebook-1.12.2-2.8.3.jar and created a copy of "guidebook.xml" with my own content and saved it (for now) as "ic2.xml"
For now, assume that my xml is valid. I kept it short and simple, and used https://www.xmlvalidation.com/

Gigaherz's "guidebook.xml" is located in Guidebook-1.12.2-2.8.3.jar\assets\gbook\xml and this jar is copied to my .minecraft\mods folder.
Now, I'd like to get my "ic2.xml" to show up as a readable book while logged into the game. But I don't know how to create a mod.

Guidebook's wiki says
“Guidebook has 3 ways to declare new books, designed for different purposes:
Using the book registry API.
Using the configuration folder.
Using resource packs."
{source of this quote: https://github.com/gigaherz/Guidebook/wiki/1.-Adding-new-books-to-the-mod-(API-and-resource-packs)#book-registry}

In the section on resource packs, there's a link to a downloadable simple resource pack, "respack.zip"
I unzipped it and copied my ic2.xml file to respack\assets\gbook\books within it, alongside the preexisting demobook.xml.
Then I opened books.json within respack\assets\gbook and listed my xml file there, so the entire contents of the json read like so:
[ "gbook:books/demobook.xml", "gbook:books/ic2.xml" ]



Then I rezipped the contents of respack (assets folder + pack.mcmeta) and placed the resulting zip file into .minecraft\resourcepacks
I can /give the books in-game but can read neither. The only book I'm able to read is Guidebook's original manual. demobook doesn't open at all when "used." The book identified as "Guidebook - gbook:books/ic2.xml unknown" opens up, but says only

"Error loading book:
java.io.FileNotFoundException:
gbook:books/ic2.xml"

I'm trying to digest http://craftingjava.blogspot.com/2012/05/file-not-found-exception-file-not-found.html but https://stackoverflow.com/questions/19871955/java-io-filenotfoundexception-the-system-cannot-find-the-file-specified doesn't make sense to me
1
01/28/2019 11:59 pmhistory
Level 27 : Expert Explorer
barrowisp
barrowisp's Avatar
more from https://github.com/gigaherz/Guidebook/wiki/1.-Adding-new-books-to-the-mod-(API-and-resource-packs) :

An example of structure is as follows:
assets/gbook/
books.json -- with contents [ "gbook:books/book1.xml", "gbook:books/book2.xml" ]books/book1.xmlbook2.xml"
I have:
.minecraft/ resourcepacks/ respack.zip/ assets/ gbook/ books/ demobook.xml ic2.xml textures/ books.json -- with contents [ "gbook:books/demobook.xml", "gbook:books/ic2.xml" ]
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome