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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| 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. | Bogged: 3, Parched: 4 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| dist_from_boundary | [5, 0, 5] | Array of numbers | The distance from the boundary the villager must be within in to explore the outskirts. |
| dist_from_boundary (Dist From Boundary) | not set | Dist From Boundary (Dist From Boundary) item | |
| explore_dist | 5 | Decimal number | Total distance in blocks the the entity will explore beyond the village bounds when choosing its travel point. |
| max_travel_time | 60 | Decimal number | This 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_time | 0 | Decimal number | 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. |
| min_dist_from_target | 2.25 | Decimal number | The entity must be within this distance for it to consider it has successfully reached its target. |
| min_perimeter | 1 | Decimal number | The minimum perimeter of the village required to run this goal. |
| min_wait_time | 3 | Decimal number | The 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_xz | 5 | Integer number | A 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_y | 3 | Integer number | A 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. |
| 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. |
| speed_multiplier | 1 | Decimal number | The multiplier for speed while using this goal. 1.0 maintains the speed. |
| timer_ratio | 2 | Decimal number | Each 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
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Dist From Boundary (Dist From Boundary)
Dist From Boundary Properties
JSON path: dist_from_boundary
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number | |
| z | 0 | Decimal 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
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| goal_radius | 1.5 | Decimal number | Distance in blocks within the mob considers it has reached it's target position. Value must be > 0. |
| max_fertilizer_usage | 1 | Integer number | The maximum number of times the mob will use fertilzer on the target block. Value must be > 0. |
| 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. |
| search_cooldown_max_seconds | 8 | Decimal number | The 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_count | 9 | Integer number | 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. |
| search_height | 1 | Integer number | The height in blocks the mob will search within to find a valid target position. Value must be > 0. |
| search_range | 1 | Integer number | The distance in blocks the mob will search within to find a valid target position. Value must be > 0. |
| speed_multiplier | 0.5 | Decimal number | Movement 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
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| cooldown_time | 0 | Decimal number | Time in seconds the mob has to wait before using the goal again |
| 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. |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| avoid_water | false | Boolean true/false | If true, the mob will not go into water blocks when going towards a mount | Parrot: true |
| control_flags | [] | Control Flags choices | ||
| max_failed_attempts | 20 | Integer number | Number of attempts to find mount | Drowned: 20 |
| mount_distance | -1 | Decimal number | This 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 distance | Parrot: 2 |
| 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. | Drowned: 1, Parrot: 4 |
| start_delay | 0 | Integer number | Time the mob will wait before starting to move towards the mount | Drowned: 15, Parrot: 100 |
| target_needed | false | Boolean true/false | If true, the mob will only look for a mount if it has a target | |
| within_radius | 0 | Decimal number | Distance in blocks within which the mob will look for a mount | Drowned: 16 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| 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. | Dolphin: 2 |
| search_range | 0 | Integer number | The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards. | Dolphin: 30 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Dolphin: 2 |
| stop_distance | 2 | Decimal number | The distance the mob will move before stopping. | Dolphin: 50 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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_xandmax_head_rotation_yare 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, andprojectile_z_offsetvalues 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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| attack_cooldown | 0.5 | Decimal number | The cooldown time in seconds before this goal can be used again. | Breeze: 0.5 |
| attack_range | {"max":0,"min":0} | Attack Range item | Target 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 item | Conditions that need to be met for the behavior to start. | Breeze: {"all_of":[{"test":"is_navigating","value":false}]} |
| filters (Alternate 1) | not set | Object | ||
| max_head_rotation_x | 30 | Decimal number | Maximum head rotation (in degrees), on the X-axis, that this entity can apply while trying to look at the target. | |
| max_head_rotation_y | 30 | Decimal number | Maximum head rotation (in degrees), on the Y-axis, that this entity can apply while trying to look at the target. | |
| owner_anchor | 2 | Integer number | Entity anchor for the projectile spawn location. | Breeze: 2 |
| owner_offset | [0, 0, 0] | Array of numbers | Offset vector from the owner_anchor. | Breeze: [0,0.3,0] |
| owner_offset (Owner Offset) | not set | Owner Offset (Owner Offset) item | ||
| post_shoot_delay | 0.20000000298023224 | Decimal number | Time in seconds between firing the projectile and ending the goal. | Breeze: 0.2 |
| pre_shoot_delay | 0.75 | Decimal number | Time in seconds before firing the projectile. | Breeze: 0.75 |
| 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. | Breeze: 2 |
| projectile_def | String | Actor 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_fov | 90 | Decimal number | Field of view (in degrees) when using sensing to detect a target for attack. | Breeze: 90 |
| target_anchor | 2 | Integer number | Entity anchor for projectile target. | |
| target_offset | [0, 0, 0] | Array of numbers | Offset vector from the target_anchor. | Breeze: [0,0.5,0] |
| target_offset (Target Offset) | not set | Target Offset (Target Offset) item |
Legacy FloatRange
Legacy FloatRange Properties
JSON path: attack_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Decimal number | |
| min | 0 | Decimal number |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Filters
Filters Properties
JSON path: filters
| Name | Default Value | Type | Description |
|---|---|---|---|
| domain | not set | Object | The domain the test should be performed in. |
| operator | not set | Object | The comparison to apply with 'value'. |
| subject | not set | Object | The subject of this filter test. |
| test | not set | String | The name of the test to apply. |
| value | not set | Object | The value being compared with the test. |
Owner Offset (Owner Offset)
Owner Offset Properties
JSON path: owner_offset
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number | |
| z | 0 | Decimal 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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| 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. | Bogged: 2, Parched: 3 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Bogged: 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| chance_per_tick_to_float | 0.8 | Decimal number | Probability per tick (0-1) that the entity will attempt to float when in water. | |
| control_flags | [] | Control Flags choices | ||
| 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. | Allay: 7, Cave Spider: 1 |
| sink_with_passengers | false | Boolean true/false | If true, the mob will keep sinking as long as it has passengers. | |
| time_under_water_to_dismount_passengers | 0 | Decimal number | Time 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
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Allay
"minecraft:behavior.float": {
"priority": 7
}
Bat
"minecraft:behavior.float": {
"priority": 0
}
Cave Spider
"minecraft:behavior.float": {
"priority": 1
}
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |