Book
A written book with pages in book markup:
Book guide { title = "Guide", author = "The Garrison", text = ["# Welcome", "Plant the **banner** on gold."] }.
Its name stands for the book in item stacks, loot entries and ${...}
in commands.
Book name {
title = ...
author = ...
} Book is a Blueprint in the prelude: it is written in MMS, and every project has it.
Fields
titlestringThe title on the cover and the item's name, at most 32 characters.
authorstringgenerationoptionalBookGeneration?textoptionalBookText?The book's text in book markup, one string per line, or
TextFile("books/guide.mmsbook")to read it from a file. A line of---starts the next page.pagesoptional[Text]?The pages as text components, for full control. Use
textinstead for book markup.componentsdefault{}DataComponentPatchMore item components, such as
loreorcustom_data. Every use of the book gets them.
What its name stands for
Where one of these types is expected, the declaration's name means:
ItemStackTemplateIn a recipe result, a loot entry, or
${...}in a command: a written book with these pages.ItemStackLootPoolEntryId<item>A Book used where the game takes a plain item id, such as a recipe ingredient or an item tag. It stands for written_book there, so any written book matches.