Wiki 9Minecraft Patchouli Mod Wiki

Patchouli Mod — Guide

Text Formatting

Patchouli uses a custom formatting system to style text within books. These codes are placed directly in the JSON strings.

Common Formatting Codes

Code Effect Description
$(br) Line Break Moves text to the next line.
$(br2) Paragraph Adds a double line break.
$(li) List Item Adds a bullet point.
$(c:hex) Color Changes text color (e.g., $(c:ff0000) for red).
$(l:id) Link Creates a clickable link to another entry or category.
$(bold) Bold Makes the following text bold.
$(italic) Italic Makes the following text italicized.
$ Reset Clears all active formatting.

Macros

Creators can define custom macros to simplify long formatting strings. For example, a macro $(item) could be set to $(c:blue)$(bold) to highlight item names consistently.

Modpack Integration

For modpack makers (versions 1.20.1, 1.21.1), Patchouli content is stored in the following directory: instance/patchouli_books/<your_book_name>/

Inside this folder, the structure must follow this pattern: * book.json: Defines the book's name, landing page text, and visual style. * en_us/categories/: Contains JSON files for each category. * en_us/entries/: Contains JSON files for each entry. * en_us/templates/: Contains custom page layouts.

Note for 1.20+: Patchouli now enforces the use of the Resource Pack system. While the book.json remains in the data folder, all content (entries and categories) should be placed in the assets folder of your mod or resource pack to ensure proper loading and compatibility.