Skip to main content

Introduction

More RPG Library provides a public API for mod developers to build upon. The library extends Spell Engine with new spell schools, custom impacts, entity attributes, status effects, and more.

Main Mod Class

The entry point for the library is MRPGCMod.java located in the common module:
package net.more_rpg_classes;

public class MRPGCMod {
    public static final String MOD_ID = "more_rpg_classes";
    public static final Logger LOGGER = LoggerFactory.getLogger("more_rpg_classes");
    
    public static void init() {
        // Main initialization
    }
}
Key Constants:
  • MOD_ID: The mod identifier string "more_rpg_classes"
  • LOGGER: SLF4J logger instance for the library
Reference: common/src/main/java/net/more_rpg_classes/MRPGCMod.java:32-33

Architecture

More RPG Library uses a multi-loader architecture powered by Architectury:
  • Common module: Platform-agnostic code shared between loaders
  • Fabric module: Fabric-specific implementation
  • NeoForge module: NeoForge-specific implementation

Initialization Flow

The MRPGCMod.init() method handles core initialization:
  1. Configuration Loading - Refreshes all config files (effects, tweaks, weakness, loot)
  2. Custom Impacts - Registers custom spell impacts
  3. Loot Table Events - Sets up loot table modification listeners
  4. Spell Schools - Initializes custom spell schools
  5. Entity Predicates - Registers custom entity predicates
  6. Compatibility - Initializes compatibility with other mods
Reference: common/src/main/java/net/more_rpg_classes/MRPGCMod.java:62-78

Core Features

Custom Spell Impacts

The library provides custom spell impact handlers that can be used in spell JSON files. See the Custom Spell Impacts guide for available impacts.

Spell Schools

New spell schools are registered through MoreSpellSchools.initialize(), including:
  • Air Magic, Earth Magic, Water Magic, Nature Magic
  • Fire Ranged, Frost Ranged
  • Rage Melee

Entity Attributes

Custom entity attributes like Lifesteal, Damage Reflect, Rage, Spell Vampire, and various “Fuse” attributes.

Status Effects

Harmful and beneficial status effects including Frozen Solid, Bleeding, Ignited, and more.

Loot Functions

Custom loot table functions for:
  • Conditional spell scrolls from pools
  • Binding spells to items
  • Conditional item entries with fallbacks

Configuration System

The library uses Tiny Config for configuration management:
public static ConfigManager<ConfigFile.Effects> effectsConfig;
public static ConfigManager<TweaksConfig> tweaksConfig;
public static ConfigManager<WeaknessConfig> weaknessConfig;
public static ConfigManager<LootConfig> lootConfig;
All configs are stored in the config/more_rpg_classes/ directory.

Creating Identifiers

Use the helper method to create namespaced identifiers:
public static Identifier id(String path) {
    return Identifier.of(MOD_ID, path);
}
Example: MRPGCMod.id("custom_spell") returns more_rpg_classes:custom_spell Reference: common/src/main/java/net/more_rpg_classes/MRPGCMod.java:108-110

Dependencies

More RPG Library requires the following mods: Required: Optional Compatibility:

Next Steps

Dependency Setup

Add More RPG Library to your project

Custom Spell Impacts

Learn about available custom impacts

Spell Schools

Explore the new spell schools

Entity Attributes

View custom entity attributes