Effect
The arc:effect reward type applies a potion effect to the player.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
effect | Effect | ✅Required | -No default value | The effect to apply. |
duration | int | ✅Required | -No default value | The duration of the effect in ticks. |
amplifier | int | ❌Optional | 0 | The amplifier of the effect. |
Example
The following example will give the player a Speed II effect for 10 seconds when they break any log.
data/my_datapack/arc/speed_on_log_break.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_break_block",
"conditions": [
{
"type": "arc:blocks",
"blocks": ["#minecraft:logs"]
}
],
"rewards": [
{
"type": "arc:effect",
"effect": "minecraft:speed",
"duration": 200,
"amplifier": 1
}
]
}
## Compatible Action Types
<CompatibleActionTypes />