Prepares a written book with colored pages, a title and an author. Checks how much fits on a page by width and height, wraps long text, and outputs a ready /give command.
A written book lets you produce finished, colour-formatted text with a single /give — no hand-editing NBT.
A book stores a title, an author and an array of pages. Each page is a JSON component, so you can mix colours, styles and line breaks freely.
The tool assembles the whole structure and outputs a ready command.
Book pages are not stretchy: they have a width and a height in pixels, and characters take up different amounts of space. The tool measures capacity from the actual glyphs and wraps long text so the last line does not run off the bottom of the page.
Type a book title and author — colours work there just like on the pages.
Add as many pages as you need and fill in each one.
Style with codes: &a for colour, &l for bold, &r to reset.
Copy the /give command and run it.
Around 320 characters per page. Longer text is truncated by the game when the book is opened.
A written_book can still be edited. One flagged resolved opens immediately and can't be edited.
Check that the colour code comes at the start of the fragment and is followed by a reset &r, otherwise formatting can bleed into the next paragraph.