Entity Documentation - minecraft:on_target_acquired
minecraft:on_target_acquired
adds a trigger to call when this entity finds a target.
Important
minecraft:on_target_acquired
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_acquired":{
"event": "minecraft:all_range_mode",
"filters": "has_ranged_weapon",
"target": "self",
}
Vanilla entities examples
enderman
"minecraft:on_target_acquired": {
"event": "minecraft:become_angry",
"target": "self"
}