TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/Bards/llms.txt
Use this file to discover all available pages before exploring further.
BardBooks class manages spell book registration for the Bards RPG mod. It provides a simple interface to create and register spell books that players can use to learn and cast bard-specific spells.
Overview
The BardBooks class handles the creation and registration of spell books for the bard class. Spell books are special items that contain spell knowledge and can be used by players to access their bard abilities.Methods
register()
Registers all spell books for the Bards RPG mod.Example usage
Implementation details
- Creates a list containing the book names (currently only “bard”)
- Iterates through each book name
- Creates an identifier using the mod ID and book name
- Registers the spell book with the Spell Engine API
Spell book structure
Book naming convention
Spell books follow the naming pattern:bards:bard
- Namespace:
bards(the mod ID) - Path: Book name from the list (e.g.,
bard)
Registration with Spell Engine
The registration uses the Spell Engine API’screateAndRegister method:
The unique identifier for the spell book (e.g.,
bards:bard)The creative inventory group where the book should appear
Book entries
Bard spell book
The main spell book for bard class spells.bards:bardGroup.KEY - The Bards RPG creative tabExtending the system
Adding additional spell books
To add more spell book types, simply add their names to the books list:Custom registration
For more control over individual spell books, you can register them separately:Dependencies
The BardBooks class depends on:net.spell_engine.api.item.SpellBooks- Provides the spell book creation and registration functionalitynet.minecraft.util.Identifier- For creating unique identifierscom.bards.item.Group- The creative tab group for Bards items
Integration with Spell Engine
The spell books registered by this class integrate with the Spell Engine mod to:- Store spell data and configurations
- Provide spell learning mechanics
- Enable spell casting functionality
- Integrate with the spell progression system
Example: Complete registration flow
Best practices
Naming conventions
- Use lowercase names for spell books
- Use underscores for multi-word names (e.g.,
advanced_bard) - Keep names descriptive and related to the spell content