Skip to main content

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.

More RPG Library provides custom entity predicates that can be used in spell conditions to control when spells can be cast based on entity state.

Overview

Entity predicates allow you to add conditions to your spells that check the state of the caster or target. More RPG Library adds several predicates focused on environmental conditions.

Available Predicates

The library registers three custom entity predicates:

is_on_ground

ID: more_rpg_classes:is_on_ground Checks if the entity is not on the ground (i.e., airborne).
Despite the name, this predicate returns true when the entity is NOT on the ground. This is for use with spell conditions that prevent casting.

is_wet

ID: more_rpg_classes:is_wet Checks if the entity is not wet (not in water or rain).

is_inside_water

ID: more_rpg_classes:is_inside_water Checks if the entity is not inside water or a bubble column.

Usage in Spells

Entity predicates are used in the spell_entity_requirements section of your spell configuration to add casting conditions.

Basic Syntax

spell.json
{
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_on_ground"
    ]
  }
}

Examples

Ground-Only Spells

Create a spell that can only be cast while on the ground:
earth_slam.json
{
  "name": "Earth Slam",
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_on_ground"
    ]
  },
  "impacts": [
    {
      "action": {
        "type": "DAMAGE",
        "damage": 15
      },
      "area": {
        "type": "CIRCLE",
        "radius": 5
      }
    }
  ]
}
Ground-only spells are great for earth magic, stomps, and area-of-effect abilities that require stability.

Water-Required Spells

Create a spell that requires the caster to be in water:
tidal_wave.json
{
  "name": "Tidal Wave",
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_inside_water"
    ]
  },
  "impacts": [
    {
      "action": {
        "type": "DAMAGE",
        "damage": 20
      },
      "area": {
        "type": "CONE",
        "angle": 90,
        "range": 10
      }
    }
  ]
}
Because the predicate checks for NOT in water, it will prevent casting when the condition is true (not in water). To require water, you may need to combine this with other conditions or use inverted logic depending on your Spell Engine version.

Dry Environment Spells

Create a fire spell that can’t be cast while wet:
flame_burst.json
{
  "name": "Flame Burst",
  "school": "fire",
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_wet"
    ]
  },
  "impacts": [
    {
      "action": {
        "type": "DAMAGE",
        "damage": 12
      }
    },
    {
      "action": {
        "type": "STATUS_EFFECT",
        "effect": "minecraft:fire_resistance",
        "duration": 100,
        "amplifier": 0
      }
    }
  ]
}

Combining Multiple Predicates

You can combine multiple predicates for more complex conditions:
aerial_strike.json
{
  "name": "Aerial Strike",
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_on_ground",
      "more_rpg_classes:is_wet"
    ]
  },
  "impacts": [
    {
      "action": {
        "type": "CUSTOM",
        "custom": {
          "intent": "HARMFUL",
          "handler": "more_rpg_classes:knock_up_fixed"
        }
      }
    },
    {
      "action": {
        "type": "DAMAGE",
        "damage": 18
      }
    }
  ]
}
This spell can only be cast while:
  • Airborne (not on ground)
  • Not wet

Understanding Predicate Logic

The predicates are inverted from their names. This is important to understand:
  • is_on_ground returns true when NOT on ground
  • is_wet returns true when NOT wet
  • is_inside_water returns true when NOT in water
This design is intended for use with spell requirement systems that prevent casting when predicates return true.

Creating Themed Spell Sets

Air Magic Theme

Spells that require being airborne:
{
  "spell_entity_requirements": {
    "predicates": ["more_rpg_classes:is_on_ground"]
  }
}
Example spells:
  • Updraft
  • Aerial Dash
  • Wind Blast
  • Sky Strike

Water Magic Theme

Spells that require water:
{
  "spell_entity_requirements": {
    "predicates": ["more_rpg_classes:is_inside_water"]
  }
}
Example spells:
  • Tidal Wave
  • Whirlpool
  • Water Breathing
  • Aqua Jet

Fire Magic Theme

Spells that require dry conditions:
{
  "spell_entity_requirements": {
    "predicates": ["more_rpg_classes:is_wet"]
  }
}
Example spells:
  • Inferno
  • Flame Wall
  • Combustion
  • Heat Wave

Advanced Usage

Combining with Spell Engine Predicates

You can combine More RPG Library predicates with standard Spell Engine predicates:
spell.json
{
  "spell_entity_requirements": {
    "predicates": [
      "more_rpg_classes:is_on_ground",
      "spell_engine:has_high_health"
    ],
    "health": {
      "min": 0.5
    }
  }
}

Creating Situational Spells

Use predicates to create spells with interesting situational uses:
{
  "name": "Emergency Landing",
  "description": "Can only be cast while falling",
  "spell_entity_requirements": {
    "predicates": ["more_rpg_classes:is_on_ground"]
  },
  "impacts": [
    {
      "action": {
        "type": "STATUS_EFFECT",
        "effect": "minecraft:slow_falling",
        "duration": 100,
        "amplifier": 0
      }
    }
  ]
}

Implementation Details

The predicates are registered in the library’s initialization:
CustomSpellEntityPredicate.java
SpellEntityPredicates.register(
    Identifier.of(MOD_ID, "is_on_ground"),
    entity -> !entity.entity().isOnGround()
);

SpellEntityPredicates.register(
    Identifier.of(MOD_ID, "is_wet"),
    entity -> !entity.entity().isWet()
);

SpellEntityPredicates.register(
    Identifier.of(MOD_ID, "is_inside_water"),
    entity -> !entity.entity().isInsideWaterOrBubbleColumn()
);
Source: common/src/main/java/net/more_rpg_classes/custom/CustomSpellEntityPredicate.java:9

Troubleshooting

Predicate Not Working

1

Check Spell Engine version

Ensure you’re using a compatible version of Spell Engine that supports custom entity predicates.
2

Verify predicate ID

Make sure you’re using the correct predicate ID: more_rpg_classes:is_on_ground, not is_on_ground.
3

Understand the inversion

Remember that the predicates are inverted. If your spell isn’t casting when expected, check the predicate logic.

Spell Always/Never Castable

If your spell is always castable or never castable:
  • Check that the predicate array is properly formatted in your JSON
  • Verify that you’re testing in the correct environment (in water, on ground, etc.)
  • Check the Spell Engine documentation for how predicates are evaluated
Test your spells in different environments (ground, air, water, rain) to ensure the predicates work as expected.

Build docs developers (and LLMs) love