Skip to main content

Entity AI goal reference (34/41)

This page carries the AI goal (behavior) pages of MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). IDs, property names, types, default values and JSON are as in the original. The full list is in the index.

minecraft:behavior.sniff​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_sniff.md)

Allows this entity to detect the nearest player within "sniffing_radius" and update its "minecraft:suspect_tracking" component state.

Entity Sniff Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
cooldown_range{"max":10,"min":3}Cooldown Range itemCooldown range between sniffs in secondsWarden: {"min":5,"max":10}
duration1Decimal numberSniffing duration in secondsWarden: 4.16
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Warden: 6
sniffing_radius5Decimal numberMob detection radiusWarden: 24
suspicion_radius_horizontal3Decimal numberMob suspicion horizontal radius. When a player is within this radius horizontally, the anger level towards that player is increasedWarden: 6
suspicion_radius_vertical3Decimal numberMob suspicion vertical radius. When a player is within this radius vertically, the anger level towards that player is increased Value must be >= 1.Warden: 20

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: cooldown_range

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Warden​
"minecraft:behavior.sniff": {
"duration": 4.16,
"sniffing_radius": 24,
"suspicion_radius_horizontal": 6,
"suspicion_radius_vertical": 20,
"cooldown_range": {
"min": 5,
"max": 10
},
"priority": 6
}

minecraft:behavior.sonic_boom​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_sonic_boom.md)

Allows this entity to perform a 'sonic boom' ranged attack.

Entity Sonic Boom Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
attack_cooldown5Decimal numberCooldown in seconds required after using this attack until the entity can use sonic boom again.Warden: 2
attack_damage30Decimal numberAttack damage of the sonic boom.Warden: 10
attack_range_horizontal15Decimal numberHorizontal range (in blocks) at which the sonic boom can damage the target.
attack_range_vertical20Decimal numberVertical range (in blocks) at which the sonic boom can damage the target.
attack_soundStringSound event for the attack.Warden: "sonic_boom"
charge_soundStringSound event for the charge up.Warden: "sonic_charge"
control_flags[]Control Flags choices
duration0Decimal numberGoal duration in secondsWarden: 3
duration_until_attack_sound1.7000000476837158Decimal numberDuration in seconds until the attack sound is played.
knockback_height_cap0Decimal numberHeight cap of the attack knockback's vertical delta.Warden: 0.5
knockback_horizontal_strength0Decimal numberHorizontal strength of the attack's knockback applied to the attack target.Warden: 2.5
knockback_vertical_strength0Decimal numberVertical strength of the attack's knockback applied to the attack target.Warden: 0.5
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Warden: 3
speed_multiplier1Decimal numberThis multiplier modifies the attacking entity's speed when moving toward the target.Warden: 1.2

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Warden​
"minecraft:behavior.sonic_boom": {
"duration": 3,
"speed_multiplier": 1.2,
"attack_damage": 10,
"attack_cooldown": 2,
"knockback_vertical_strength": 0.5,
"knockback_horizontal_strength": 2.5,
"knockback_height_cap": 0.5,
"attack_sound": "sonic_boom",
"charge_sound": "sonic_charge",
"priority": 3
}

minecraft:behavior.squid_dive​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_squid_dive.md)

Allows the squid to dive down in water.

[!Note] Can only be used on the following type of entity:

  • Squid (minecraft:squid)

Entity Squid Dive Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.squid_flee​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_squid_flee.md)

Allows the squid to swim away.

[!Note] Can only be used on the following type of entity:

  • Squid (minecraft:squid)

Entity Squid Flee Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.squid_idle​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_squid_idle.md)

Allows the squid to swim in place idly.

[!Note] Can only be used on the following type of entity:

  • Squid (minecraft:squid)

Entity Squid Idle Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.squid_move_away_from_ground​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_squid_move_away_from_ground.md)

Allows the squid to move away from ground blocks and back to water.

[!Note] Can only be used on the following type of entity:

  • Squid (minecraft:squid)

Entity Squid Move Away From Ground Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.squid_out_of_water​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_squid_out_of_water.md)

Allows the squid to stick to the ground when outside water.

[!Note] Can only be used on the following type of entity:

  • Squid (minecraft:squid)

Entity Squid Out Of Water Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.stalk_and_pounce_on_target​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_stalk_and_pounce_on_target.md)

Allows a mob to stalk a target, then once within range pounce onto a target, on success the target will be attacked dealing damage defined by the attack component. On failure, the mob will risk getting stuck.

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

  • Nearest Attackable Target Behavior (minecraft:behavior.nearest_attackable_target)

  • Hurt By Target Behavior (minecraft:behavior.hurt_by_target) [!Note] Requires the following component in order to work properly:

  • Attack (minecraft:attack)

Entity Stalk And Pounce On Target Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
interest_time2Decimal numberThe amount of time the mob will be interested before pouncing. This happens when the mob is within range of pouncing
leap_dist0.800000011920929Decimal numberThe distance in blocks the mob jumps in the direction of its target
leap_distance0.8Decimal numberThe distance in blocks the mob jumps in the direction of its target
leap_height0.8999999761581421Decimal numberThe height in blocks the mob jumps when leaping at its target
max_stalk_dist10Decimal numberThe maximum distance away a target can be before the mob gives up on stalking
pounce_max_dist5Decimal numberThe maximum distance away from the target in blocks to begin pouncing at the target
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
set_persistentfalseBoolean true/falseAllows the actor to be set to persist upon targeting a player
stalk_speed1.2000000476837158Decimal numberThe movement speed in which you stalk your target
strike_dist2Decimal numberThe max distance away from the target when landing from the pounce that will still result in damaging the target
stuck_blocks (Stuck Blocks){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Stuck Blocks itemBlocks that the mob can get stuck in after a pounce.
stuck_blocks (Alternate 1)not setObject
stuck_time2Decimal numberThe amount of time the mob will be stuck if they fail and land on a block they can be stuck on

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Stuck Blocks​

Stuck Blocks Properties​

JSON path: stuck_blocks

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Samples​

minecraft:behavior.stay_near_noteblock​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_stay_near_noteblock.md)

The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.

Entity Stay Near Noteblock Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
listen_time30Integer numberSets the time an entity should stay near a noteblock after hearing it.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Allay: 5
speed1Decimal numberSets the entity's speed when moving toward the block.Allay: 8
start_distance10Decimal numberSets the distance the entity needs to be away from the block to attempt to start the goal.Allay: 16
stop_distance2Decimal numberSets the distance from the block the entity will attempt to reach.Allay: 4

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Allay​
"minecraft:behavior.stay_near_noteblock": {
"speed": 8,
"start_distance": 16,
"stop_distance": 4,
"priority": 5
}

minecraft:behavior.stay_while_sitting​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_stay_while_sitting.md)

Allows the mob to stay put while it is in a sitting state instead of doing something else.

[!Note] This behavior works with the minecraft:sittable component. When the entity is commanded to sit, this goal prevents other behaviors from moving the entity.

Entity Stay While Sitting Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Parrot: 2

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Parrot​
"minecraft:behavior.stay_while_sitting": {
"priority": 2
}

minecraft:behavior.stomp_attack​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_stomp_attack.md)

Allows an entity to attack using stomp AoE damage behavior.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON for this behavior.

Entity Stomp Attack Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
attack_oncefalseBoolean true/falseAllows the mob to perform this melee attack behavior only once during its lifetime.
attack_typesStringDefines the entity types this entity will attack.
can_spread_on_firefalseBoolean true/falseAllows the mob, if on fire and empty handed, to ignite its target upon a successful attack.
control_flags[]Control Flags choices
cooldown_time1Decimal numberCooldown time, in seconds, between consecutive attacks.
inner_boundary_time_increase0.25Decimal numberTime, in seconds, added to the attack path recalculation interval when the target is beyond "path_inner_boundary".
max_path_time0.550000011920929Decimal numberMaximum base time, in seconds, before recalculating a new attack path to the target (before increases are applied).
min_path_time0.20000000298023224Decimal numberMinimum base time, in seconds, before recalculating a new attack path to the target (before increases are applied).
no_damage_range_multiplier2Decimal numberMultiplied with the final AoE damage range to determine a no damage range. The stomp attack will go on cooldown if target is in this no damage range. Value must be > 0.Polar Bear: 2
on_attack{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Attack itemDefines the event to trigger when this entity successfully attacks.
on_kill{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Kill itemDefines the event to trigger when this entity kills the target.
outer_boundary_time_increase0.5Decimal numberTime, in seconds, added to the attack path recalculation interval when the target is beyond "path_outer_boundary".
path_fail_time_increase0.75Decimal numberTime, in seconds, added to the attack path recalculation interval when the mob cannot move along the current path.
path_inner_boundary16Decimal numberDistance at which to increase attack path recalculation by "inner_boundary_time_increase".
path_outer_boundary32Decimal numberDistance at which to increase attack path recalculation by "outer_boundary_time_increase".
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Polar Bear: 1
random_stop_interval0Integer numberDefines a 1-in-N chance for the mob to stop its current attack, where N equals "random_stop_interval".
reach_multiplier2Decimal numberUsed with the base size of the entity to determine minimum target-distance before trying to deal attack damage.
require_complete_pathfalseBoolean true/falseSpecifies whether a full navigation path from the mob to the target is required.Polar Bear: true
speed_multiplier1Decimal numberMultiplier applied to the mob's movement speed when moving toward its target.
stomp_range_multiplier2Decimal numberMultiplied with the base size of the entity to determine stomp AoE damage range. Value must be > 0.Polar Bear: 2
track_targetfalseBoolean true/falseAllows the mob to track its target even if it lacks a hard-coded sensing component.Polar Bear: true
x_max_rotation30Decimal numberMaximum rotation, in degrees, on the X-axis while the mob is trying to look at its target.
y_max_head_rotation30Decimal numberMaximum rotation, in degrees, on the Y-axis while the mob is trying to look at its target.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Entity ActorDefinitionTrigger​

Triggers an entity event when specified conditions are met. Events activate component groups that change entity behavior—transforming villagers into zombie villagers, switching mobs to aggressive mode, or triggering growth stages. Combine with filters to create conditional state machines that respond to gameplay.

Entity ActorDefinitionTrigger Properties​

JSON path: on_attack

NameDefault ValueTypeDescription
eventString
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemFilters allow data objects to specify test criteria which allows their use.
filters (Alternate 1)not setObject
targetselfTarget choices
filters​

Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.

Filters​
Filters Properties​

JSON path: on_attack > filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Target choices​

ValueTitleDescription
babyBaby
blockBlock
damagerDamager
holderHolder
itemItem
otherOther
parentParent
playerPlayer
selfSelf
targetTarget

Samples​

Polar Bear​
"minecraft:behavior.stomp_attack": {
"priority": 1,
"track_target": true,
"require_complete_path": true,
"stomp_range_multiplier": 2,
"no_damage_range_multiplier": 2
}

minecraft:behavior.stomp_turtle_egg​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_stomp_turtle_egg.md)

Allows this mob to stomp turtle eggs.

Entity Stomp Turtle Egg Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
goal_radius0.5Decimal numberDistance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot. Value must be > 0.Drowned: 1.14
interval120Integer numberA random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal Value must be > 0.Drowned: 20
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Drowned: 4
search_count10Integer numberThe number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to.
search_height1Integer numberHeight in blocks the mob will look for turtle eggs to move towards Value must be > 0.Drowned: 2
search_range0Integer numberThe distance in blocks it will look for turtle eggs to move towards Value must be > 0.Drowned: 10
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this goal.Drowned: 1

search_count​

The number of randomly selected blocks each tick that the mob will check within its search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Drowned​
"minecraft:behavior.stomp_turtle_egg": {
"goal_radius": 1.14,
"priority": 4,
"search_height": 2,
"interval": 20,
"search_range": 10,
"speed_multiplier": 1
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13