Repository navigation
Book Definition
Once again, unlike other mods Guided offers a simplified implementation. Your book definition only requires the name parameter by default.
Simplest implementation:
{
"name": "My First Guidebook"
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string |
Yes | null |
Name of guidebook |
type |
string |
No | book |
Type of guidebook |
navigation |
boolean |
No | false |
Legacy fallback for type |
style |
string |
No | guided:default |
Registered Java or JSON style |
creative_tab |
string |
No | null |
ID of Creative Tab for your guidebook item |
item_model |
string |
No | guided:item/error_book |
ID of Baked Model for your guidebook item |
sounds |
json object |
No | See below | IDs of sounds played by your guidebook |
landing_texture |
string |
No | null |
ID of landing page texture |
landing_texture_width |
integer |
No | 128 |
Width of landing page texture |
landing_texture_height |
integer |
No | 128 |
Height of landing page texture |
landing_text |
string |
No | Empty | Text displayed on landing page |
book_texture |
string |
No | Style default | Texture of traditional guidebook (272 × 180) |
browser_frame |
string |
No | guided:core/frame |
Sprite of browser frame |
browser_background |
string |
No | guided:textures/gui/sprites/core/browser_background.png |
Texture of browser background |
parallax_image |
string |
No | Browser background | Texture of parallax background |
parallax_width |
integer |
No | 32 |
Width of parallax tile |
parallax_height |
integer |
No | 32 |
Height of parallax tile |
top_overlay |
string |
No | guided:core/top_overlay |
Sprite of top overlay |
bottom_overlay |
string |
No | guided:core/bottom_overlay |
Sprite of bottom overlay |
left_overlay |
string |
No | guided:core/left_overlay |
Sprite of left overlay |
right_overlay |
string |
No | guided:core/right_overlay |
Sprite of right overlay |
divider_texture |
string |
No | guided:page/divider |
Sprite of entry title divider |
preview_frame |
string |
No | guided:page/preview_frame |
Sprite of preview frame |
advancement_frame |
string |
No | guided:page/advancement_frame |
Sprite of advancement frame |
slice_button |
string |
No | guided:widgets/slice_button |
Sprite of multiblock slice button |
slice_button_hovered |
string |
No | guided:widgets/slice_button_hovered |
Sprite of hovered multiblock slice button |
shaped_crafting_texture |
string |
No | guided:page/recipes/shaped_crafting |
Sprite of shaped crafting recipe |
shapeless_crafting_texture |
string |
No | guided:page/recipes/shapeless_crafting |
Sprite of shapeless crafting recipe |
smelting_texture |
string |
No | guided:page/recipes/smelting |
Sprite of smelting recipe |
smoking_texture |
string |
No | guided:page/recipes/smoking |
Sprite of smoking recipe |
blasting_texture |
string |
No | guided:page/recipes/blasting |
Sprite of blasting recipe |
This is an optional entry. Every sound with a missing or unavailable ID will be replaced with minecraft:item.book.page_turn.
Example definition:
{
"sounds": {
"open": "minecraft:item.book.page_turn",
"close": "minecraft:item.book.page_turn",
"back": "minecraft:item.book.page_turn",
"category": "minecraft:item.book.page_turn",
"entry": "minecraft:item.book.page_turn",
"page_turn": "minecraft:item.book.page_turn"
}
}-
open- sound played when book is being opened -
close- sound played when book is being closed -
back- sound played when back button is pressed -
category- sound played when category is being opened -
entry- sound played when entry is being opened -
page_turn- sound played when page is turned
Guided offers 5 guidebook variants that behave differently:
-
browser- Thaumcraft-style guidebook -
book- Traditional two-page guidebook -
pamphlet- Single-category traditional two-page guidebook -
network- Single-category Thaumcraft-style guidebook -
entry- Traditional two-page guidebook with a single entry
If type is not specified, Guided will use the navigation parameter to determine the type of guidebook. If navigation is set to true, the guidebook will use the browser type. Otherwise, it will use the book type.
Guided offers several built-in item models that can be used for your guidebooks:
guided:item/blue_bookguided:item/cyan_bookguided:item/green_bookguided:item/purple_bookguided:item/red_bookguided:item/error_book
You can also use your own item models.
For example, example:item/guidebook will use the model located at assets/example/models/item/guidebook.json
Example definition:
{
"item_model": "guided:item/cyan_book"
}By default your guidebook will not appear in any Creative Tab. To add your guidebook to a Creative Tab specify its ID using the creative_tab parameter.
Example definition:
{
"creative_tab": "minecraft:tools_and_utilities"
}Guidebooks of the book type allow you to customize their landing page. You can add an image, introductory text or both.
Example definition:
{
"type": "book",
"landing_texture": "example:textures/gui/landing.png",
"landing_texture_width": 128,
"landing_texture_height": 96,
"landing_text": "Welcome to my guidebook!"
}The image will automatically scale to fit the page while preserving its aspect ratio.
Landing page text supports Localization and Text Formatting, but does not support clickable internal links.
When changing the appearance of your guidebook it is important to understand the difference between texture and sprite IDs.
- Texture ID:
example:textures/gui/background.png - Sprite ID:
example:custom/frame
These IDs point to the following files respectively:
assets/example/textures/gui/background.png
assets/example/textures/gui/sprites/custom/frame.png
Sprites support Minecraft's built-in animation and nine-slice scaling using .png.mcmeta files.
Browser and network guidebooks use a tiled parallax background that moves at one quarter of the browser's movement speed.
You can change its appearance and tile size using the parallax_image, parallax_width and parallax_height parameters.
Example definition:
{
"parallax_image": "example:textures/gui/background.png",
"parallax_width": 64,
"parallax_height": 64
}Tile dimensions can range from 1 to 4096.
Guided allows you to customize decorative overlays displayed around the browser frame. If you don't want to display an overlay, use none instead of its sprite ID.
Example definition:
{
"top_overlay": "none",
"bottom_overlay": "none",
"left_overlay": "none",
"right_overlay": "none"
}Appearance parameters can also be defined inside categories and styles. Guided will look for these parameters in the following order:
- Category definition
- Book definition
- Style definition
- Default values
This allows you to customize individual categories without changing the appearance of the entire guidebook.
For more information about creating your own styles see Styles.
Instead of using plain text for your guidebook name you can use a translation key.
Example definition:
{
"name": "book.example.guidebook"
}Inside assets/example/lang/en_us.json:
{
"book.example.guidebook": "Example Guidebook"
}For more information see Localization.
Here is an example of a guidebook definition using multiple parameters:
{
"name": "book.example.guidebook",
"type": "browser",
"style": "guided:default",
"creative_tab": "minecraft:tools_and_utilities",
"item_model": "guided:item/cyan_book",
"parallax_image": "example:textures/gui/background.png",
"parallax_width": 64,
"parallax_height": 64,
"sounds": {
"open": "minecraft:item.book.page_turn",
"close": "minecraft:block.chest.close"
}
}Now that you have defined your guidebook, you can start Working with Categories.