Bookshelf
Darkhax's open-source library mod. It provides a shared code base for many mods, and also ships a few debug commands and datapack features.
📖 Introduction
Bookshelf is an open-source library mod by Darkhax — a collection of code, frameworks, and utilities that many other mods build on top of. It's a long-running project stretching from 1.7.10 to current versions, supporting Forge, NeoForge, Fabric, and Quilt.
Why library mods exist — a library like Bookshelf lets seemingly unrelated mods share parts of the same code base. That reduces the time and effort needed to build individual mods, and because the library's code is exercised across a much wider range of circumstances and communities, it tends to mean fewer bugs and better performance downstream.
It isn't purely for developers, either. There are a few genuinely player-facing features.
- Debug commands — /bookshelf hand, for instance, tells you the ID of the item you're holding.
- Datapack features — additions vanilla doesn't have, such as crafting recipes that damage an item's durability instead of consuming it.
For modders, it provides JSON/network/NBT serialization, utility functions, a registry manager, and new recipe, ingredient, loot-condition, loot-modifier, and item-predicate types.
Actual dependency relationships — Darkhax's Enchantment Descriptions and Dark Utilities both require Bookshelf (as of 1.21.1). Note that those same mods also require Prickle, another Darkhax library, so when adding mods manually, follow the dependency list on the CurseForge or Modrinth page exactly rather than assuming Bookshelf alone is enough.
🕒 When to Use This Mod
You mostly never 'use' Bookshelf. It runs automatically whenever a mod that requires it is installed, and if it's already bundled in your pack, leave it alone. That said, /bookshelf hand is genuinely handy when you need an item ID.
📦 Where It Matters Most
It runs behind the scenes in any pack that includes even one Darkhax mod. Large modpacks typically ship several different authors' library mods at once, and Bookshelf is one of them.
🚀 Getting Started — First 30 Minutes
It's a library mod, so there's nothing to 'start'. Two things are worth knowing.
If it came with your pack
Leave it alone. No configuration required.
If you're adding mods yourself
When putting a Darkhax mod into a pack, read the Dependencies section on its CurseForge/Modrinth page as written. Some require only Bookshelf; others require Prickle as well. And the Minecraft version + loader combination has to line up exactly.
One thing worth remembering
/bookshelf hand prints the ID of the item you're holding — handy when working on recipes or config files.
💡 Gameplay Tips
- Don't remove it on a hunch — if any mod that requires it is installed, the game won't start. If it came with the pack, leaving it alone is the correct move.
/bookshelf handgives you item IDs — it prints the ID of whatever you're holding, which is useful when editing recipes or config files.- You may also need Prickle — recent Darkhax mods require Prickle in addition to Bookshelf. Grabbing only Bookshelf will still crash you.
- Builds differ by loader and version — separate builds exist per loader (Forge, NeoForge, Fabric, Quilt) and per Minecraft version. When downloading manually, match the exact combination the dependent mod asks for.
⚠️ Common Confusing Points
- • Installing it looks like nothing happened — mostly true. It's a code collection for other mods to use. The debug commands and a handful of datapack features are the exceptions players can actually touch.
- • Bookshelf showing up in a log doesn't make it the culprit — when another mod calls into Bookshelf and something breaks, Bookshelf's name lands in the stack trace anyway. Look at the calling mod first.
❓ FAQ
What does installing only Bookshelf add?
Almost nothing. It's mainly a code collection for other mods. There are a few player-usable features, though — debug commands like /bookshelf hand, and datapack features such as crafting recipes that damage an item's durability instead of consuming it.
What happens if I remove it?
If a mod that requires it is installed, the game won't start. Darkhax's Enchantment Descriptions and Dark Utilities are examples. Leaving the pack's default setup alone is the safe call.
Is Bookshelf all I need to download?
Possibly not. Recent Darkhax mods require Prickle, another library, alongside Bookshelf. If you're adding a mod manually, follow the dependency list on its page exactly.