Mob Abilities

A guide to adding mob abilities

You can assign any mob in minecraft a custom mob ability that is executed when certain actions occur with Soul Metal tools. Every mob trait just contains a list of mob trait data that all get executed at once. Any mob trait can have an infinite amount of any kind of mob trait data.

Trait Types

These are all the default mob traits found in Spirit. Required fields are marked with Required. Optional fields shown in the code block indicate thier default value

(Required fields do not have default values)

The "type" field is also required, modders can define thier own types here. Since it is a resourcelocation/identifier, the mod prefix is required.

{
    "type": "spirit:damage",
    "additionalDamage": 2.0
}
  • Required:"additionalDamage": float

    Specifies how much additional damage is done when a soul metal

Register Mob Trait

Mob traits can be specified for any mob by creating a new json file in your recipes folder.

An example of a mob trait:

{
    "type": "spirit:mob_trait",
    "entity": "minecraft:warden"
    "traits": [
        {
            "type": "spirit:potion_effect",
            "effects": [
                {
                    "effect": "minecraft:darkness",
                    "duration": 150
                },
                {
                    "effect": "minecraft:slowness",
                    "duration": 100
                }
            ]
        },
        {
            "type": "spirit:knockback",
            "knockback": 2
        },
        {
            "type": "spirit:damage",
            "additionalDamage": 2.5
        },
        {
            ...
        }
    ]
}
  • Required:"entity": string

    Specifies the mob id of the mob that is required in the soul crystal to activate the specified effects

  • Required:"traits": array of traits

    Specifies all traits that are applied when a tool is used and the soul is consumed

Last updated