How Books was built

Raw game files read

Processing

Each config/lore/<code>.json file is just a title lang-key reference and an ordered array of "piece" lang-key references -- the real prose lives in the lang file itself, not inline in these files, resolved the same way every other display string is (including mod-domain-prefixed keys like betterruins:lore-brickworkerslament-title). The game's own ___NEWPAGE___ marker inside a piece's text splits it into multiple book pages.

Where a book can be found is read from the schematics of every structure that references them (models/loreLocations.ts), using three signals:

The block-entity values are matched by pattern over the raw decoded bytes (a pattern match was kept from before the attribute-tree parser modelled item stacks). This shows where the game can place a book, not a drop chance.

Pipeline code