Book.json
book.json defines the content, behavior, and non-visual settings for a book. It is placed in /data/<mod_id>/modonomicon/books/<book_id>/book.json.
Book appearance is no longer configured in book.json.
Things like colors, text offsets, frame styling, page textures, and other theme-related settings now live in theme.json.
Attributes
name (DescriptionId, mandatory)
The book name. Will not parse markdown.
description (DescriptionId or Component JSON, optional)
The book description. Can be styled using markdown. Will be displayed on the first page when opening the book if it is in index mode.
display_mode (String, optional)
Default value: node.
The display mode of the book. Can be node or index.
Index mode ("patchouli-style") displays all categories in a list. Node mode ("thaumonomicon-style") displays a tree / quest / progress view of the book. A book in node mode can still contain categories in index mode.
tooltip (DescriptionId, optional)
The book tooltip, shown when the item is hovered. Will not parse markdown.
generate_book_item (Boolean, optional)
Default value: true.
If true, a book item will automatically be generated for this book.
If false, no book item will be generated and you need to provide a custom item that opens this book.
If generate_book_item is false, custom_book_item needs to be set.
model (ResourceLocation, optional)
Default value: modonomicon:modonomicon_purple.
The item model to use for the generated book item.
Builtin always-loaded models:
modonomicon:modonomicon_purplemodonomicon:modonomicon_bluemodonomicon:modonomicon_greenmodonomicon:modonomicon_red
This cannot just be a texture. It must be a loaded model in /assets/<mod_id>/models/item/<model_file>.json.
That means it either needs to belong to an existing item, or it must be explicitly loaded by your platform setup.
custom_book_item (ResourceLocation, mandatory if generate_book_item is false)
The ResourceLocation for your custom book item. This is your custom item instance that will open the book.
creative_tab (String, optional)
Default value: misc.
The creative tab for the automatically generated book item.
Ignored if generate_book_item is false.
font (ResourceLocation, optional)
Default value: modonomicon:default.
The font to use in the book.
Must be a valid and loaded Minecraft font.
The default font is based on https://github.com/latvian-dev/slightly-improved-font and is more readable than minecraft:default.
page_display_mode (String, optional)
Default value: double_page.
Can be single_page or double_page.
This controls how entries are rendered. Categories and books in index mode always use double page display.
turn_page_sound (ResourceLocation, optional)
Default value: minecraft:turn_page.
The sound event to play when turning a page.
The sound must be a loaded sound event defined in /assets/<mod_id>/sounds.json.
leaflet_entry (ResourceLocation, optional)
If set, the book will ignore its normal navigation structure and directly display this one entry. The entry still needs to be part of a valid category, even if that category is not shown.
Leaflets are treated like index-mode books.
See also Leaflets.
allow_open_book_with_invalid_links (Boolean, optional)
Default value: false.
If set to true, invalid links do not stop the book from opening.
Instead, the broken link is rendered in red with a tooltip explaining that it is invalid.
This is mainly useful when translations may temporarily reference outdated entry ids.
show_recently_unlocked (Boolean, optional)
Default value: true.
If set to true, a Recently Unlocked button is shown in the book sidebar.
It opens a paginated view of unlocked entries, with unread entries first and then by most recent unlock time.
Set it to false to hide the button.
Moved to theme.json
The following settings used to live in book.json, but now belong in theme.json:
default_title_colordefault_text_colorbook_overview_textureframe_textureleft_frame_overlay,right_frame_overlay,top_frame_overlay,bottom_frame_overlaybook_content_texturesingle_page_texturecrafting_texturecategory_button_icon_scalecategory_button_x_offsetcategory_button_y_offsetsearch_button_x_offsetsearch_button_y_offsetread_all_button_y_offsetbook_text_offset_xbook_text_offset_ybook_text_offset_widthbook_text_offset_height
Usage Example
/data/<mod_id>/modonomicon/books/<book_id>/book.json:
{
"name": "book.example.name",
"description": "book.example.description",
"tooltip": "book.example.tooltip",
"display_mode": "node",
"generate_book_item": true,
"model": "modonomicon:modonomicon_purple",
"creative_tab": "misc",
"font": "modonomicon:default",
"page_display_mode": "double_page",
"turn_page_sound": "minecraft:turn_page",
"allow_open_book_with_invalid_links": false,
"show_recently_unlocked": true
}