Skip to main content

Spotlight Page

Spotlight Page

Page type: modonomicon:spotlight

Displays an Ingredient and optionally a title and text.

Attributes

title (DescriptionId or Component JSON, optional)

The page title. Will not parse markdown, instead it uses the default title color as defined in the book.json.
See Book.json for details.

tip

If ommited, the ingredients name will be used. If the ingredient is not an item, the first matching item's name will be used.

item (Ingredient OR ItemStack, mandatory)

The Ingredient to display. Uses the vanilla ingredient system, so any valid recipe ingredient JSON object can be used.
Alternatively, an ItemStack JSON can be used. Both id and item are valid keys for the item resource location.
If the display item uses components the ItemStack JSON should be used, as ingredients do not support components.

text (DescriptionId or Component JSON, optional)

The page text. Can be styled using markdown.

Usage Examples

<entry>.json:

{
...
"pages": [
{
"type": "modonomicon:spotlight",
"anchor": "",
"item": {
"item": "minecraft:apple"
},
"text": "book.modonomicon.demo.features.spotlight.spotlight1.text",
"title": "book.modonomicon.demo.features.spotlight.spotlight1.title"
}
]
}
{
...
"pages": [
{
"type": "modonomicon:spotlight",
"anchor": "",
"item": {
"components": {
"minecraft:dyed_color": {
"rgb": 1481884,
"show_in_tooltip": false
}
},
"item": "minecraft:leather_helmet"
},
"text": "book.modonomicon.demo.features.spotlight.spotlight1.text",
"title": "book.modonomicon.demo.features.spotlight.spotlight1.title"
}
]
}

/lang/*.json:

{
"book.modonomicon.demo.features.spotlight.spotlight1.text": "A sample spotlight page with custom title.",
"book.modonomicon.demo.features.spotlight.spotlight1.title": "Custom Title"
}