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

minecraft:behavior.stalk_and_pounce_on_target

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

Overview

minecraft:behavior.stalk_and_pounce_on_target is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob sneak up on its target and then leap onto it, dealing the damage from minecraft:attack. If the pounce misses, the mob can get stuck for a moment. Foxes hunt this way.

Fields

FieldTypeDefaultDescription
stalk_speednumber1.2Speed while sneaking up on the target.
max_stalk_distnumber10If the target gets farther than this, the mob stops stalking.
leap_heightnumber0.9How high, in blocks, the mob jumps when it pounces.
leap_distnumber0.8How far forward, in blocks, the mob jumps when it pounces.
pounce_max_distnumber5The mob starts its pounce once the target is closer than this.
strike_distnumber2How close the mob must land to the target for the pounce to hurt it.
interest_timenumber2How long the mob waits, crouched and ready, before pouncing.
stuck_timenumber2How long the mob stays stuck after a missed pounce.
set_persistentbooleanfalseIf true, the mob will not despawn after it targets a player.
stuck_blocksFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Which blocks the mob can get stuck in after a missed pounce, like snow.
priorityinteger0Decides which goal wins when several want to run: lower numbers run first.Range: 0 to …
control_flagsGoal's control flags[]noneLists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together.

Example

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

BP/entities/<name>.json
{
  "minecraft:behavior.stalk_and_pounce_on_target": {
    "stalk_speed": 1.2,
    "max_stalk_dist": 10,
    "leap_height": 0.9,
    "leap_dist": 0.8,
    "pounce_max_dist": 5,
    "strike_dist": 2,
    "interest_time": 2,
    "stuck_time": 2
  }
}

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