Babel Book Loot is a customizable Minecraft data pack that adds over 160 pre-written lore books to various loot tables. You can expand the library by adding your own books.
The pack is compatible with Minecraft 1.21.4 and likely works with older versions.
- Download the Data Pack: Download babel_v2.0.zip.
- Install: Place the downloaded
.zip
file in your Minecraft world'sdatapacks
directory.
- Book Sources: Find books in village and stronghold chests, woodland mansions, fish them up, or get them from a librarian as a raid reward. The pack also introduces a new structure, the Lost Library, filled with book-related loot.
- Books to be found: Includes lore, mechanics, fiction, and more, written by "in-universe" authors.
- Book Rarity: You'll normally find books that are a "copy of a copy." But you'll rarely find books of other types.
Additional variations of the pack offer tweaked mechanics:
- babel-bookish-zombies_v2.0.zip: Zombies can drop books when killed by a player.
- babel-only-chests_v2.0.zip: Books are chest-exclusive (no fishing or raid reward).
- babel-no-libraries_2.0.zip: Removes Lost Libraries.
- babel-fairytales_2.0.zip: Replaces lore books with public domain fairy tales.
- babel-recipe_v2.0.zip: Adds the below crafting recipe for random books.
The Babel Builder tool lets you customize your pack further:
- Download the Tool:
- babel-builder-windows_v2.0.zip (Windows)
- babel-builder-python_v2.0.zip (Python)
- Run the Tool:
- Windows:
babel.exe
- Python:
python babel.py
- Windows:
- Install Output: Place the generated
babel.zip
in your Minecraft world'sdatapacks
directory.
Books are stored in the lore_books
directory, which can be changed via the books-path
setting in the configuration file.
Books can be written in JSON or YAML formats. For example:
title: Sample Book
author: Some Author
pages:
- This is page one.
- This is page two.
- This is page three.
{
"title": "Sample Book",
"author": "Some Author",
"pages": [
"This is page one.",
"This is page two.",
"This is page three."
]
}
Minecraft accepts slightly non-standard JSON, and Babel does its best to handle these formats. To ensure proper formatting, write pages directly in Minecraft or use tools like Text2Book.
Books can include additional attributes:
weight
: Affects selection probability (default:1
).lore
: Adds lore text, similar topages
.custom_data
: Adds custom NBT tags.
Example with optional parameters:
{
"title": "Another Sample Book",
"author": "Some Author",
"pages": ["Hello World!"],
"weight": 2,
"lore": [[{"text":"Lore line 1","color":"blue"}], "Lore line 2"],
"custom_data": {"foo": "bar", "number": 16}
}
Edit config.yaml
to:
- Disable specific loot drops.
- Adjust generation chances.
- Modify other pack settings.
usage: babel.py [-h] [-v] [-i] [-t] [-a] [-c] [filename]
positional arguments:
filename Optional config filename. (default: config.yaml)
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-i, --indent Indent output json files. Overrides config field.
-m, -t, --metabox Add test loot tables. Overrides config field.
-a, --append-version Append babel version number to output filename.
-c, --chance-calc Calculate real chances of various book generations and exit.
Add books to custom loot tables using:
{
"type": "minecraft:loot_table",
"value": "babel:books"
}
If you just want to generate the loot table without the surrounding files, try running:
python build_loottable.py config.yaml > books.json
- Submit issues or suggestions on GitHub.
- Reach out via Mastodon: @[email protected].
- Loot tables you generate with text you own are yours to use freely.
- Public domain books are sourced from Project Gutenberg.
- Babel tool and data pack are copyright Joseph Fowler. A credit is appreciated but not required.
Software is provided "as is," without warranty or liability. Use at your own risk.