Entries
Entries are defined in json files placed in the /data/<mod_id>/modonomicon/books/<book_id>/entries/<category_id>/ folder.
Attributes
type (Identifier, mandatory)
The entry type.
Builtin entry types are:
modonomicon:contentfor normal entries withpagesmodonomicon:category_linkfor entries that open another category viacategory_to_openmodonomicon:entry_linkfor entries that open another entry viaentry_to_open
id (Identifier, mandatory)
The unique id of this entry within the book.
This is the id used by links and parent references.
For entries stored in entries/<category_id>/, this is typically the full path including the category folder, for example yourmod:features/my_entry.
category (Identifier, mandatory)
The Identifier of the category this entry should be placed in.
The file hierarchy of the entry's json file does not actually assign the entry to the category, only this field does!
name (DescriptionId, mandatory)
The entry name, will be shown in bold when hovering over the Entry. Will not parse markdown.
description (DescriptionId, optional)
The entry description, will be shown below the name when hovering over the Entry. Will not parse markdown.
icon (Identifier, mandatory)
Either an item/block Identifier that should be used as icon. E.g.: minecraft:nether_star or minecraft:chest.
Or the Identifier to a texture. The texture must be 16x16 pixels. E.g.: modonomicon:textures/gui/some_random_icon.png.
To use a texture make sure the Identifier includes the file ending .png as seen in the example above.
x (Integer, mandatory)
The x coordinate (horizontal) of the entry in the category.
y (Integer, mandatory)
The y coordinate (vertical) of the entry in the category.
sort_number (Integer, optional)
Defaults to -1.
If the category of this entry is in "index" mode, then the sort number will be used to order the entries (instead of using x/y to place the entry on the 2d node grid).
When using datagen and no sort number is provided, the CategorProvider will automatically assign a sort number based on the order the entries are added when using .add().
hide_while_locked (Boolean, optional)
Default value: false. If true, this entry will not be shown as greyed out while it is locked, instead it will be entirely hidden.
Usually the default value is what you want. Regardless of this setting, locked entries will be hidden fully until the entry just before them (= the immediate parent) becomes unlocked, and only then show greyed out. true will cause the entry to stay hidden even then.
show_when_any_parent_unlocked (Boolean, optional)
Default value: false.
If true, the entry will show (locked) as soon as any one parent is unlocked.
If false, the entry will only show (locked) as soon as all parents are unlocked.
If you want this true or false depends on how "discoverable" you want your book to be. If true the entry will be visible to the player earlier, and the tooltip will indicate that they will need another entry to unlock it.
If false the entry will only show once all parents of it are unlocked, effectively making the player aware much later.
background (Sprite JSON Object, optional)
Defines the sprite used as the entry background.
Default value:
{
"sprite": "modonomicon:modonomicon/themes/default/node/entry_backgrounds/square_gold",
"width": 26,
"height": 26
}