Edit

Entity Documentation - minecraft:behavior.leap_at_target

Allows monsters to jump at and attack their target. Can only be used by hostile mobs.

Note

Requires a target in order to work properly. Entities can generate targets via one of the following behaviors:

Entity Leap At Target Behavior Properties

Name Default Value Type Description Example Values
control_flags [] Control Flags choices
must_be_on_ground true Boolean true/false If true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air
priority 0 Integer number As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal. Cave Spider: 4
set_persistent false Boolean true/false Allows the actor to be set to persist upon targeting a player
yd 0 Decimal number The height in blocks the mob jumps when leaping at its target Cave Spider: 0.4

Control Flags choices

Value Title Description
jump Jump
look Look
move Move

Samples

Cave Spider

At /minecraft:entity/component_groups/minecraft:spider_angry/minecraft:behavior.leap_at_target/:

"minecraft:behavior.leap_at_target": {
  "must_be_on_ground": false,
  "priority": 4,
  "yd": 0.4
}