Effect
The arc:effect condition type checks for a specific mob effect.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
effect | MobEffectInstance | ✅Required | - | The effect to check. |
check_amplifier | boolean | ❌Optional | false | Whether to check the amplifier. |
amplifier_comparison | ComparisonType | ❌Optional | == | How to compare the amplifier. |
check_duration | boolean | ❌Optional | false | Whether to check the duration. |
duration_comparison | ComparisonType | ❌Optional | == | How to compare the duration. |
Example
The following example will give the player a feather every time they receive the Slow Falling effect.
data/my_datapack/arc/feather_for_slow_falling.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_add_effect",
"conditions": [
{
"type": "arc:effect",
"effect": "minecraft:slow_falling"
}
],
"rewards": [
{
"type": "arc:item",
"item": { "id": "minecraft:feather" }
}
]
}
Compatible Action Types
💉 On Effect Added
The arc:onaddeffect action type is triggered when a player receives a potion effect.