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

title
string

The title on the cover and the item's name, at most 32 characters.

author
string
generationoptional
BookGeneration?
textoptional
BookText?

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 text instead for book markup.

componentsdefault {}
DataComponentPatch

More item components, such as lore or custom_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:

ItemStackTemplate

In a recipe result, a loot entry, or ${...} in a command: a written book with these pages.

ItemStack
LootPoolEntry
Id<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.