Entity Documentation - minecraft:on_target_escape

minecraft:on_target_escape adds a trigger to call when this entity loses the target it currently has.

Important

minecraft:on_target_escape requires a target in order to work properly.

Parameters

Name Default Value Type Description
event not set String The event to run when the conditions for this trigger are met.
filters not set Minecraft Filter The list of conditions for this trigger to execute.
target self String The target of the event.

Example

"minecraft:on_target_escape":{
    "event": "minecraft:lost_them",
    "filters": "has_target",
    "target": "self",
}

Vanilla entities examples

magma_cube

"minecraft:on_target_escape": {
    "event": "minecraft:become_calm",
    "target": "self"
}

Vanilla entities using minecraft:on_target_escape