SubLib — Guide
RPG Inventory Framework
One of SubLib's primary functions is managing the RPG Inventory Layer. This system extends the standard Minecraft player inventory to include specialized slots for magical jewelry and equipment.
| Slot Type | Description | Supported Items (via RPG Inventory) |
|---|---|---|
| Necklace | A single slot for amulets and necklaces. | Healing Amulets, Fire Resistance Necklaces |
| Rings | Two slots (Left and Right hand). | Strength Rings, Haste Rings, Debuff Cleansing Rings |
| Cape | A dedicated slot for cosmetic and functional capes. | Creeper Capes, Invisibility Cloaks |
| Gloves | A slot for gauntlets or gloves. | Mining Gloves, Combat Bracers |
| Shield | A dedicated off-hand or secondary shield slot. | Class-specific Shields |
SubLib handles the data syncing for these slots, ensuring that the bonuses provided by items in these slots are correctly applied to the player's stats across server sessions.
Class & Ability System
SubLib decouples the "Class" data from specific mods, allowing different class-based mods to work together seamlessly. It manages the player's current class assignment, level, and experience data.
Supported Classes
- Berserker: Focuses on high physical damage and AoE attacks like the Hammer Smash.
- Mage: Utilizes a wand system where spells are cast via chat commands or hotkeys.
- Archer: Enhances bow mechanics and projectile speed.
- Necromancer: Allows for the summoning of undead minions.
- Paladin: A defensive class focused on shields and holy fire abilities.

PetBuddy Integration
SubLib contains the base entity code for the PetBuddy, a miniature companion that follows the player.
Pet Mechanics
- Behavior: The pet uses SubLib's targeting logic to stay within a specific radius of the owner. It can be set to stay, follow, or ride on the player's shoulder.
- Appearance: The pet can mimic the player's skin or be transformed into various mobs using specific items.
- Inventory: SubLib provides the pet with its own small inventory, allowing it to act as a mobile storage unit.

Supported Mods
The following mods require SubLib to function correctly:
- RPG Inventory: Adds the jewelry system, capes, and the specialized inventory GUI.
- BMA (Berserker, Mage, Archer): The core class mod adding three distinct combat archetypes.
- UmbraLux (Necromancer, Paladin): An expansion to the class system focusing on light and dark magic.
- PetBuddy Mod: Adds the customizable miniature companion.
- Beastmaster: A class mod focused on taming and commanding animals.
Mechanics & Technical Details
Creative Tab
SubLib adds a unified creative tab titled "Subaraki's Mods". This tab serves as a central location for items from all installed mods in the Subaraki suite, preventing the creative menu from becoming cluttered.
Networking & Syncing
SubLib uses a custom packet handling system to ensure that player data (such as active class abilities or equipped jewelry) is synced between the server and the client. This prevents "ghosting" issues where a player might see an item equipped that the server does not recognize.
Configuration
The mod generates a configuration file located at .minecraft/config/sublib.cfg.
* Targeting Settings: Allows users to adjust the sensitivity of the raytracing for spell casting.
* GUI Offsets: Provides options to move the RPG Inventory button if it overlaps with other modded GUIs.