Skip to content
Leo edited this page May 6, 2024 · 1 revision

BookProperties

The books of the API have multiple properties, between this are configurable "and no-configurables" ( with the call of a custom method ).

BookBuilder Properties

The book builder is the base of the basic properties of the book, below this you can see what properties can configure the BookBuilder.

Property Type Description Default Value
id resource location The id is have the namespace and the identifier of the book, this is used for the book item id and used in the [Configurations][config]. mandatory
contentProvider consumer The content provider of the book, have all the categories, entries and pages of the book. mandatory
shouldSpawnWithBook boolean If it's called on the BookBuilder the player it's gonna spawn with the book who have this enable. false
information book information The information of the book is mostly used in the information screen. empty
header text component The header is the text that is displayed on the top of the book. Unknown
subheader text component The subheader is a text displayed under the header. empty
itemName text component The name displayed on the item. Unknown
author text component a text that displays the author(s) name(s) in the item descriptions. Unknown Author
bookColor color The color of the book item texture. rgb(255, 128, 26)
pagesColor color The color of the book pages in the screens. bookColor if null
bookTextures guide texture Get 2 textures, one for the top, and one for the pages, this applies for the home, category and entry screens. gapi:textures/gui/book_pages.png" ^ gapi:textures/gui/book_top.png
infoTextures guide texture Get 2 textures, one for the top, and one for the pages, this applies for the information screen. gapi:textures/gui/info_page.png & gapi:textures/gui/info_top.png
pagesTexture guide texture Get 2 textures, one for the top, and one for the pages, this applies for the pages of the entries. gapi:textures/gui/page.png & gapi:textures/gui/page_top.png

BookInformation Properties

The BookInformation properties mostly affects only to the information screen of the guide, the only property that doesn't affect only the Information Screen is title.

There are all the BookInformation properties:

Property Type Description Default Value
title text component The title is a text that the mod put has replacement of other components if someone is null. Unknown
modName text component The modName is the name of the mod that is gonna be displayed on the information screen. Unknown
description text component The description is displayed on the information screen, this only explain the book purposes. empty
credits text component The credits of the guide are displayed on the information screen and have the credits for the authors. Unknown

"Non-configurable" properties

The Non-configurable properties are not properties as such but i didn't find another way to call them that way we will call them "properties".

The "Non-configurable properties" are mostly booleans that check some things to do in the client.

Property Type Description Default Value
useCustomBookTextures boolean If it's true the ClientProxy doesn't paint the texture with the color of the book. false
useCustomInfoPagesTexture boolean If it's true the information screen doesn't paint the top of the information screen. false
useCustomPagesTexture boolean If it's true the pages of the entries doesn't paint the top of the texture with the book color.