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.
Specifies all effects that will be applied when the mob trait is applied. You can technically have multiple potion mob trait data listed in the same mob trait, but there is really no need to because of this.
Required: "effect": string
Specifies which potion effect is applied, minecraft prefix is required.
"duration": integer
Specifies how long the potion effect lasts in ticks
"amplifier": integer
Specifies level of the potion effect. The amplifier is added to the default level of 1, so only change this if you want higher levels of potion effects
"ambient": boolean
Honestly dont know what this does lmao
"visible": boolean
Specifies whether or not potion particles are visible
"showIcon": boolean
Specifies whether or not potion icon shows in player's inventory
{
"type": "spirit:knockback",
"knockback": 2
}
Required:"knockback": integer
Specifies how many additional levels of knockback are applied when the item interacts with an entity. Essentially, it applies this level of knockback/punch ontop of already existing enchantments.