1. Wiki
  2. /Entities
  3. /minecraft:on_target_escape

minecraft:on_target_escape

Don't want to write this by hand? GodCraft sets minecraft:on_target_escape for you with a switch.Get GodCraft

Overview

minecraft:on_target_escape is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Runs an event when this entity loses track of its current target.

Fields

FieldTypeDefaultDescription
eventstring""Name of the event to run.
targetFilterSubject"self"Who the event runs on, for example self or other.
filtersFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Conditions that must be true for the event to run.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:on_target_escape": {
    "event": "",
    "target": "self",
    "filters": {
      "AND": null,
      "NOT": null,
      "OR": null,
      "all": null,
      "all_of": null,
      "any": null,
      "any_of": null,
      "none_of": null
    }
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more