Skip to main content

Entity AI goal reference (14/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.equip_item​

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

The entity puts on the desired equipment.

Entity Equip Item 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.Bogged: 3, Parched: 4

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Bogged​
"minecraft:behavior.equip_item": {
"priority": 3
}
Parched​
"minecraft:behavior.equip_item": {
"priority": 4
}

minecraft:behavior.explore_outskirts​

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

Allows the entity to first travel to a random point on the outskirts of the village, and then explore random points within a small distance.

[!Note] Requires the following components in order to work properly:

  • Dweller (minecraft:dweller)
  • Navigation (minecraft:navigation)

Entity Explore Outskirts Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
dist_from_boundary[5, 0, 5]Array of numbersThe distance from the boundary the villager must be within in to explore the outskirts.
dist_from_boundary (Dist From Boundary)not setDist From Boundary (Dist From Boundary) item
explore_dist5Decimal numberTotal distance in blocks the the entity will explore beyond the village bounds when choosing its travel point.
max_travel_time60Decimal numberThis is the maximum amount of time an entity will attempt to reach it's travel point on the outskirts of the village before the goal exits.
max_wait_time0Decimal numberThe wait time in seconds between choosing new explore points will be chosen on a random interval between this value and the minimum wait time.
min_dist_from_target2.25Decimal numberThe entity must be within this distance for it to consider it has successfully reached its target.
min_perimeter1Decimal numberThe minimum perimeter of the village required to run this goal.
min_wait_time3Decimal numberThe wait time in seconds between choosing new explore points will be chosen on a random interval between this value and the maximum wait time.
next_xz5Integer numberA new explore point will randomly be chosen within this XZ distance of the current target position when navigation has finished and the wait timer has elapsed.
next_y3Integer numberA new explore point will randomly be chosen within this Y distance of the current target position when navigation has finished and the wait timer has elapsed.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
speed_multiplier1Decimal numberThe multiplier for speed while using this goal. 1.0 maintains the speed.
timer_ratio2Decimal numberEach new explore point will be chosen on a random interval between the minimum and the maximum wait time, divided by this value.

max_wait_time​

The wait time in seconds between choosing new explore points will be chosen on a random interval between this value and the minimum wait time. This value is also the total amount of time the entity will explore random points before the goal stops.

timer_ratio​

Each new explore point will be chosen on a random interval between the minimum and the maximum wait time, divided by this value. This does not apply to the first explore point chosen when the goal runs.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Dist From Boundary (Dist From Boundary)​

Dist From Boundary Properties​

JSON path: dist_from_boundary

NameDefault ValueTypeDescription
x0Decimal number
y0Decimal number
z0Decimal number

Samples​

minecraft:behavior.fertilize_farm_block​

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

Allows the mob to search within an area for a growable crop block. If found, the mob will use any available fertilizer in their inventory on the crop. This goal will not execute if the mob does not have a fertilizer item in its inventory.

Entity Fertilize Farm Block Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
goal_radius1.5Decimal numberDistance in blocks within the mob considers it has reached it's target position. Value must be > 0.
max_fertilizer_usage1Integer numberThe maximum number of times the mob will use fertilzer on the target block. Value must be > 0.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
search_cooldown_max_seconds8Decimal numberThe maximum amount of time in seconds that the goal can take before searching again. The time is chosen between 0 and this number. Value must be > 0.
search_count9Integer 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 numberThe height in blocks the mob will search within to find a valid target position. Value must be > 0.
search_range1Integer numberThe distance in blocks the mob will search within to find a valid target position. Value must be > 0.
speed_multiplier0.5Decimal numberMovement speed multiplier of the mob when using this goal.

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​

minecraft:behavior.find_cover​

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

Allows the mob to seek shade.

Entity Find Cover Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
cooldown_time0Decimal numberTime in seconds the mob has to wait before using the goal again
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI Goal

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.find_mount​

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

Allows the mob to look around for another mob to ride atop it.

Entity Find Mount Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
avoid_waterfalseBoolean true/falseIf true, the mob will not go into water blocks when going towards a mountParrot: true
control_flags[]Control Flags choices
max_failed_attempts20Integer numberNumber of attempts to find mountDrowned: 20
mount_distance-1Decimal numberThis is the distance the mob needs to be, in blocks, from the desired mount to mount it. If the value is below 0, the mob will use its default attack distanceParrot: 2
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Drowned: 1, Parrot: 4
start_delay0Integer numberTime the mob will wait before starting to move towards the mountDrowned: 15, Parrot: 100
target_neededfalseBoolean true/falseIf true, the mob will only look for a mount if it has a target
within_radius0Decimal numberDistance in blocks within which the mob will look for a mountDrowned: 16

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Drowned​
"minecraft:behavior.find_mount": {
"max_failed_attempts": 20,
"priority": 1,
"start_delay": 15,
"within_radius": 16
}
Parrot​
"minecraft:behavior.find_mount": {
"avoid_water": true,
"mount_distance": 2,
"priority": 4,
"start_delay": 100,
"target_needed": false,
"within_radius": 16
}

minecraft:behavior.find_underwater_treasure​

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

Allows the mob to move towards the nearest underwater ruin or shipwreck.

Entity Find Underwater Treasure 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.Dolphin: 2
search_range0Integer numberThe range that the mob will search for a treasure chest within a ruin or shipwreck to move towards.Dolphin: 30
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalDolphin: 2
stop_distance2Decimal numberThe distance the mob will move before stopping.Dolphin: 50

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Dolphin​
"minecraft:behavior.find_underwater_treasure": {
"priority": 2,
"speed_multiplier": 2,
"search_range": 30,
"stop_distance": 50
}

minecraft:behavior.fire_at_target​

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

Allows an entity to attack by firing a shot with a delay. Anchor and offset parameters of this component overrides the anchor and offset from projectile component.

[!Note] In 1.26.0, max_head_rotation_x and max_head_rotation_y are applied to the correct axes (they were previously swapped).

[!Note] Under the Custom Projectiles experiment in format version 1.26.20, the component's projectile_x_offset, projectile_y_offset, and projectile_z_offset values are applied relative to the firing entity's rotation rather than world axes.

[!Note] This item requires a format version of at least 1.21.30.

Entity Fire At Target Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
attack_cooldown0.5Decimal numberThe cooldown time in seconds before this goal can be used again.Breeze: 0.5
attack_range{"max":0,"min":0}Attack Range itemTarget needs to be within this range for the attack to happen.Breeze: {"min":0,"max":16}
control_flags[]Control Flags choices
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemConditions that need to be met for the behavior to start.Breeze: {"all_of":[{"test":"is_navigating","value":false}]}
filters (Alternate 1)not setObject
max_head_rotation_x30Decimal numberMaximum head rotation (in degrees), on the X-axis, that this entity can apply while trying to look at the target.
max_head_rotation_y30Decimal numberMaximum head rotation (in degrees), on the Y-axis, that this entity can apply while trying to look at the target.
owner_anchor2Integer numberEntity anchor for the projectile spawn location.Breeze: 2
owner_offset[0, 0, 0]Array of numbersOffset vector from the owner_anchor.Breeze: [0,0.3,0]
owner_offset (Owner Offset)not setOwner Offset (Owner Offset) item
post_shoot_delay0.20000000298023224Decimal numberTime in seconds between firing the projectile and ending the goal.Breeze: 0.2
pre_shoot_delay0.75Decimal numberTime in seconds before firing the projectile.Breeze: 0.75
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Breeze: 2
projectile_defStringActor definition to use as projectile for the ranged attack. The actor must be a projectile. This field is required for the goal to be usable.Breeze: "minecraft:breeze_wind_charge_projectile"
ranged_fov90Decimal numberField of view (in degrees) when using sensing to detect a target for attack.Breeze: 90
target_anchor2Integer numberEntity anchor for projectile target.
target_offset[0, 0, 0]Array of numbersOffset vector from the target_anchor.Breeze: [0,0.5,0]
target_offset (Target Offset)not setTarget Offset (Target Offset) item

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: attack_range

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Filters​

Filters Properties​

JSON path: 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.

Owner Offset (Owner Offset)​

Owner Offset Properties​

JSON path: owner_offset

NameDefault ValueTypeDescription
x0Decimal number
y0Decimal number
z0Decimal number

Target Offset (Target Offset)​

Same structure as Owner Offset (Owner Offset).

Samples​

Breeze​
"minecraft:behavior.fire_at_target": {
"post_shoot_delay": 0.2,
"attack_cooldown": 0.5,
"attack_range": {
"min": 0,
"max": 16
},
"filters": {
"all_of": [
{
"test": "is_navigating",
"value": false
}
]
},
"owner_anchor": 2,
"owner_offset": [
0,
0.3,
0
],
"pre_shoot_delay": 0.75,
"priority": 2,
"projectile_def": "minecraft:breeze_wind_charge_projectile",
"ranged_fov": 90,
"target_anchor": 0,
"target_offset": [
0,
0.5,
0
]
}

minecraft:behavior.flee_sun​

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

Allows the mob to run away from direct sunlight and seek shade.

[!Note] This behavior is used by undead mobs like skeletons and zombies that burn in sunlight. The entity will seek shade or water during daytime to avoid sun damage.

Entity Flee Sun 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.Bogged: 2, Parched: 3
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalBogged: 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Bogged​
"minecraft:behavior.flee_sun": {
"priority": 2,
"speed_multiplier": 1
}
Parched​
"minecraft:behavior.flee_sun": {
"priority": 3,
"speed_multiplier": 1
}

minecraft:behavior.float​

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

Allows the mob to stay afloat while swimming. Passengers will be kicked out the moment the mob's head goes underwater, which may not happen for tall mobs.

Entity Float Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
chance_per_tick_to_float0.8Decimal numberProbability per tick (0-1) that the entity will attempt to float when in water.
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.Allay: 7, Cave Spider: 1
sink_with_passengersfalseBoolean true/falseIf true, the mob will keep sinking as long as it has passengers.
time_under_water_to_dismount_passengers0Decimal numberTime in seconds the entity must spend with its head underwater before any passengers are dismounted.

chance_per_tick_to_float​

Probability per tick (0-1) that the entity will attempt to float when in water. Lower values produce slower, more deliberate floating behavior. This item requires a format version of at least 1.21.130.

time_under_water_to_dismount_passengers​

Time in seconds the entity must spend with its head underwater before any passengers are dismounted. A value of 0 dismounts passengers as soon as the entity's head submerges. This item requires a format version of at least 1.21.130.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Allay​
"minecraft:behavior.float": {
"priority": 7
}
Bat​
"minecraft:behavior.float": {
"priority": 0
}
Cave Spider​
"minecraft:behavior.float": {
"priority": 1
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13