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)
{
"type": "spirit:damage",
"additionalDamage": 2.0
}Required:
"additionalDamage": floatSpecifies how much additional damage is done when a soul metal
{
"type": "spirit:potion_effect",
"effects": [
{
"effect": "minecraft:jump_boost",
"duration": 0,
"amplifier": 0,
"ambient": false,
"visible": true,
"showIcon": true
}
]
}Required:
"effects": array of effectSpecifies 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": stringSpecifies which potion effect is applied, minecraft prefix is required.
"duration": integerSpecifies how long the potion effect lasts in ticks
"amplifier": integerSpecifies 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": booleanHonestly dont know what this does lmao
"visible": booleanSpecifies whether or not potion particles are visible
"showIcon": booleanSpecifies whether or not potion icon shows in player's inventory
{
"type": "spirit:knockback",
"knockback": 2
}Required:
"knockback": integerSpecifies 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.
{
"type": "spirit:explosion",
"power": 2.0,
"interaction": "NONE"
}Required:
"power": floatSpecifies how much additional damage is done when a soul metal
"interaction": stringSpecifies how the explosion will interact with nearby blocks Possible values (must be written exactly as stated, as fully uppercase):
"NONE"No damage to nearby blocks"BREAK"Breaks nearby blocks and drops them"DESTROY"Breaks and destroys blocks and their drops
{
"type": "spirit:fire",
"burnTime": 7
}"burnTime": intSpecifies how long mobs burn for when hit with fire in seconds
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": stringSpecifies the mob id of the mob that is required in the soul crystal to activate the specified effects
Required:
"traits": array of traitsSpecifies all traits that are applied when a tool is used and the soul is consumed
Last updated