More RPG Library provides custom loot table functions that extend Minecraft’s loot system with spell-aware functionality and conditional item handling.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/More-RPG-Classes/llms.txt
Use this file to discover all available pages before exploring further.
Specific Spell Scroll Pool
Generates spell scrolls from specific spell pools with configurable tier ranges and blacklisting.Function ID
Parameters
List of spell pool identifiers. Use
#namespace:pool_name for tags or namespace:spell_id for exact spells.Example: ["#wizards:frost", "#wizards:fire"]Minimum spell tier to include. The function will use
Math.min(spell_tier_min, spell_tier_max) as the actual minimum.Maximum spell tier to include. The function will use
Math.max(spell_tier_min, spell_tier_max) as the actual maximum.Number of spells to add to the scroll. Supports loot number providers.
List of spell IDs to exclude from selection.Example:
["wizards:frost_blizzard", "wizards:fire_meteor"]Behavior
- Filters spells by tier range (inclusive)
- Supports both spell pool tags (with
#prefix) and exact spell IDs - Prevents duplicate spells within the same container
- Returns empty stack if no valid spells are found for scrolls
- Automatically sorts spell IDs in the container
- Sets scroll metadata for the first spell when item is a scroll
Example
Bind Spell From Pools
Binds random spells from specified pools to any item, converting it into a spell container if needed.Function ID
Parameters
List of spell pool identifiers. Use
#namespace:pool_name for tags or namespace:spell_id for exact spells.Example: ["#wizards:arcane", "#wizards:frost"]Number of spells to bind to the item. Supports loot number providers.
Optional probability (0.0-1.0) for the function to execute. If the random check fails, the original stack is returned unchanged.
Behavior
- Creates a spell container on any item, even non-spell items
- Preserves existing spells on items that are already spell containers
- Prevents duplicate spells on the same item
- Uses
SpellContainer.ContentType.MAGICfor new containers - Retries up to 3 times to avoid selecting duplicate spells
- Returns original stack if no valid spells are available
Example
Conditional Item
Replaces the loot item with a conditional item if it exists in the registry, otherwise uses the original item as fallback.Function ID
Parameters
Item ID to use if the item is registered.Example:
"your_mod:jade_gem"Behavior
- Checks if the conditional item exists in the item registry
- If found, replaces the entire stack with a new stack of the conditional item
- If not found, returns the original stack unchanged
- Does not preserve stack count from original item (conditional item starts with count 1)
- Use with
minecraft:set_countfunction to set the count after conditional replacement
Example
The
conditional_item function replaces the item but resets the count. Always apply set_count after this function if you need a specific quantity.