1. Wiki
  2. /Entities
  3. /minecraft:behavior.leap_at_target

minecraft:behavior.leap_at_target

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

Overview

minecraft:behavior.leap_at_target is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob jump at its target, like a spider pouncing. Meant for hostile mobs.

Fields

FieldTypeDefaultDescription
ydnumber0How high, in blocks, the leap goes.
must_be_on_groundbooleantrueIf true, the mob only leaps from the ground. Set to false to allow leaps while airborne.
set_persistentbooleanfalseIf true, the mob will not despawn after it targets a player.
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together.

Example

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

BP/entities/<name>.json
{
  "minecraft:behavior.leap_at_target": {
    "yd": 0,
    "must_be_on_ground": true,
    "set_persistent": false,
    "priority": 0,
    "control_flags": []
  }
}

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