Overview
The Bards RPG mod core API provides the foundational systems for the mod, including initialization, registration, and configuration management. The API is built around theBardsMod class, which serves as the entry point for all mod functionality.
Architecture
The core API follows a structured initialization pattern:- Configuration loading - All config managers are refreshed
- Custom content registration - Custom spell impacts and effects are registered
- Item registration - Items, armor, and weapons are registered
- Effect registration - Status effects are registered and saved
Key components
Main class
TheBardsMod class (located at BardsMod.java:22) is the central hub for mod initialization and provides:
- Static configuration managers for items, effects, villages, and tweaks
- Initialization methods for setting up the mod
- Registration methods for items and effects
- Utility methods like
id()for creating identifiers
Configuration managers
Four configuration managers handle different aspects of the mod:itemConfig- Equipment and item configurationseffectsConfig- Status effect configurationsvillageConfig- Village structure pool configurationstweaksConfig- Development and compatibility tweaks
ConfigManager class from the tiny_config library and are configured with:
- Automatic sanitization
- Mod-specific directory (
bards_rpg) - Default values
Registration systems
The mod uses a registration system pattern where:- Items are registered through
Armors.register(),Weapons.register(), andBardBooks.register() - Effects are registered through
BardsEffects.register() - Item groups are created and registered to the Minecraft registry
- Custom spell impacts are registered through
CustomSpellImpacts.registerCustomImpacts()
Initialization flow
Module ID
The mod uses the identifier"bards_rpg" (defined at BardsMod.java:23) for all registry entries and resource locations.
Development mode
When running in a development environment, the mod automatically enablesignore_items_required_mods in the tweaks config to allow testing items that depend on other mods without requiring those mods to be present.