Skip to main content

Apply Effect (Entity Action Type)

Gives a living entity one or more status effects. It does nothing to entities that aren't alive.

Type ID: apoli:apply_effect

Fields

FieldTypeDefaultDescription
effectStatus Effect InstanceoptionalA status effect to apply.
effectsArray of Status Effect InstanceoptionalSeveral status effects to apply.

Examples

"entity_action": {
    "type": "apoli:apply_effect",
    "effect": {
        "effect": "minecraft:speed",
        "duration": 400,
        "amplifier": 0
    }
}

This gives the entity Speed I for 20 seconds.

"entity_action": {
	"type": "apoli:apply_effect",
	"effects": [
		{
			"effect": "minecraft:slow_falling",
			"duration": 400,
			"is_ambient": false,
			"show_particles": false,
			"show_icon": true
		},
		{
			"effect": "minecraft:slowness",
			"duration": 400,
			"is_ambient": false,
			"show_particles": false,
			"show_icon": true
		}
	]
}

This gives the entity Slow Falling I and Slowness I, both for 20 seconds.