Guidebook

Guidebook

6M Downloads

Missing custom image example

gdarai opened this issue ยท 2 comments

commented

Your example <image src="minecraft:items/coal" tw="16" th="16" /> is using the internal image repo of minecraft... I can achieve the same with the stack...

So in image I see the biggest potential in beeing able to put in my own images. Add them maybe here in the resource folder and then registered them and use in the book. But I am missing any hint if I can do such thing and how. Can you provide an example or short guide please?

commented

Yes the documentation is a bit lacking...

You can place images, such as cover art, or any other kind of image you want, inside <instance>/config/books/resources/textures

So, if you put inside that folder a file called example.png, you will be able to reference it as gbook:example.
If you choose to create a sub-folder for your book's images, say, examplebook/ inside the textures folder, and in it you place image1.png, then it will be referenced as gbook:exmaplebook/image1.png.

If you want to put the book inside a mod jar or resourcepack, instead of <config>/books/resources/textures it would be assets/<domain>/textures (such as how vanilla textures are in assets/minecraft/textures/) and they would be referenced using the usual resource location style <domain>:<path>.

commented

Thank you... that is exactly the information I was missing.