Skip to main content

Effect Added

The arc:on_effect_added action type is triggered when a player receives a new effect.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:mob_effect_instanceDescribes a specific instance of a mob effect, including type, duration, and amplifier.
arc:entityRepresents an entity in the game, such as a player, mob, or item.

Example

The following example will give the player a Regeneration II effect for 10 seconds when they receive a Speed I effect or higher.

data/my_datapack/arc/speed_on_effect_added.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_effect_added",
"conditions": [
{
"type": "arc:effect",
"effect": {
"id": "minecraft:speed",
"amplifier": 0
},
"check_amplifier": true,
"amplifier_comparison": ">="
}
],
"rewards": [
{
"type": "arc:effect",
"effect": "minecraft:regeneration",
"duration": 200,
"amplifier": 1
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: