Entity AI goal reference (31/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.random_breach
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_breach.md)
Allows the mob to randomly break surface of the water.
Entity Random Breach Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| cooldown_time | 0 | Decimal number | Time in seconds the mob has to wait before using the goal again | Dolphin: 2 |
| interval | 120 | Integer number | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal | Dolphin: 50 |
| 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: 6 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | |
| xz_dist | 10 | Integer number | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 | Dolphin: 6 |
| y_dist | 7 | Integer number | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Dolphin
"minecraft:behavior.random_breach": {
"priority": 6,
"interval": 50,
"xz_dist": 6,
"cooldown_time": 2
}
minecraft:behavior.random_fly
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_fly.md)
Allows a mob to randomly fly around.
Entity Random Fly Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| avoid_damage_blocks | not set | Boolean true/false | If true, the mob will avoid blocks that cause damage when flying. | Parrot: true |
| can_land_on_trees | true | Boolean true/false | If true, the mob can stop flying and land on a tree instead of the ground | Parrot: true |
| 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. | Parrot: 3 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Parrot: 1 |
| xz_dist | 10 | Integer number | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 | Parrot: 15 |
| y_dist | 7 | Integer number | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 | Parrot: 1 |
| y_offset | not set | Decimal number |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Parrot
"minecraft:behavior.random_fly": {
"priority": 3,
"avoid_damage_blocks": true,
"can_land_on_trees": true,
"y_offset": 0,
"speed_multiplier": 1,
"xz_dist": 15,
"y_dist": 1
}
minecraft:behavior.random_hover
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_hover.md)
Allows the mob to hover around randomly, close to the surface.
[!Note] In format version 1.26.20,
hover_heightmust be specified as a Float Range object (an object withrange_min/range_max). Legacy scalar or array forms no longer parse.
Entity Random Hover Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| hover_height | {"max":0,"min":0} | Hover Height item | The height above the surface which the mob will try to maintain | Allay: [1,4] |
| interval | 120 | Integer number | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal | Allay: 1 |
| 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: 9 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | |
| xz_dist | 10 | Integer number | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 | Allay: 8 |
| y_dist | 7 | Integer number | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 | Allay: 8 |
| y_offset | 0 | Decimal number | Height in blocks to add to the selected target position | Allay: -1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Block IntRange
Block IntRange Properties
JSON path: hover_height
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Integer number | |
| min | 0 | Integer number |
Samples
Allay
"minecraft:behavior.random_hover": {
"hover_height": [
1,
4
],
"y_dist": 8,
"interval": 1,
"xz_dist": 8,
"priority": 9,
"y_offset": -1
}
minecraft:behavior.random_look_around
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_look_around.md)
Allows the mob to randomly look around.
Entity Random Look Around Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| look_time | {"max":40,"min":20} | Look Time item | The range of time in seconds the mob will stay looking in a random direction before looking elsewhere | |
| max_angle_of_view_horizontal | 180 | Decimal number | The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. | |
| min_angle_of_view_horizontal | -180 | Decimal number | The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. | |
| 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: 8, Blaze: 5, Cave Spider: 7 |
| probability | 0.019999999552965164 | Decimal number | The probability of randomly looking around. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Block IntRange
Block IntRange Properties
JSON path: look_time
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Integer number | |
| min | 0 | Integer number |
Samples
Allay
"minecraft:behavior.random_look_around": {
"priority": 8
}
Blaze
"minecraft:behavior.random_look_around": {
"priority": 5
}
Cave Spider
"minecraft:behavior.random_look_around": {
"priority": 7
}
minecraft:behavior.random_look_around_and_sit
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_look_around_and_sit.md)
Allows the mob to randomly sit and look around for a duration. Note: Must have a sitting animation set up to use this.
Entity Random Look Around And Sit Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| continue_if_leashed | false | Boolean true/false | If the goal should continue to be used as long as the mob is leashed. |
| continue_sitting_on_reload | false | Boolean true/false | The mob will stay sitting on reload. |
| control_flags | [] | Control Flags choices | |
| max_angle_of_view_horizontal | 180 | Decimal number | The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. |
| max_look_count | 2 | Integer number | The max amount of unique looks a mob will have while looking around. |
| max_look_time | 40 | Integer number | The max amount of time (in ticks) a mob will stay looking at a direction while looking around. |
| min_angle_of_view_horizontal | -180 | Decimal number | The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction. |
| min_look_count | 1 | Integer number | The min amount of unique looks a mob will have while looking around. |
| min_look_time | 20 | Integer number | The min amount of time (in ticks) a mob will stay looking at a direction while looking around. |
| 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. |
| probability | 0.019999999552965164 | Decimal number | The probability of randomly looking around. |
| random_look_around_cooldown | 0 | Integer number | The cooldown in seconds before the goal can be used again. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.random_search_and_dig
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_search_and_dig.md)
Allows this entity to locate a random target block that it can path find to. Once found, the entity will move towards it and dig up an item. [Default target block types: Dirt, Grass, Podzol, DirtWithRoots, MossBlock, Mud, MuddyMangroveRoots].
[!Note] This item requires a format version of at least 1.20.40.
Entity Random Search And Dig Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| cooldown_range | {"max":0,"min":0} | Cooldown Range item | Goal cooldown range in seconds. | Sniffer: {"min":0,"max":0} |
| digging_duration_range | {"max":10,"min":8} | Digging Duration Range item | Digging duration in seconds. | Sniffer: {"min":8,"max":10} |
| find_valid_position_retries | 5 | Integer number | Amount of retries to find a valid target position within search range. | Sniffer: 5 |
| goal_radius | 1.5 | Decimal number | Distance in blocks within the entity to considers it has reached it's target position. | Sniffer: 2 |
| item_table | String | File path relative to the resource pack root for items to spawn list (loot table format). | Sniffer: "loot_tables/gameplay/entities/sniffer_seeds.json" | |
| on_digging_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Digging Start item | Event to run when the goal ends searching has begins digging. | Sniffer: {"event":"on_digging_start","target":"self"} |
| on_fail_during_digging | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Fail During Digging item | Event to run when the goal failed while in digging state. | Sniffer: {"event":"on_fail_during_digging","target":"self"} |
| on_fail_during_searching | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Fail During Searching item | Event to run when the goal failed while in searching state. | Sniffer: {"event":"on_fail_during_searching","target":"self"} |
| on_item_found | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Item Found item | Event to run when the goal find a item. | Sniffer: {"event":"on_item_found","target":"self"} |
| on_searching_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Searching Start item | Event to run when the goal starts searching. | Sniffer: {"event":"on_searching_start","target":"self"} |
| on_success | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Success item | Event to run when searching and digging has ended. | Sniffer: {"event":"on_search_and_digging_success","target":"self"} |
| 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. | Sniffer: 5 |
| search_range_xz | 10 | Integer number | Width and length of the volume around the entity used to find a valid target position | Sniffer: 20 |
| search_range_y | 7 | Integer number | Height of the volume around the entity used to find a valid target position | Sniffer: 3 |
| spawn_item_after_seconds | 0 | Decimal number | Digging duration before spawning item in seconds. | Sniffer: 6 |
| spawn_item_pos_offset | 0 | Decimal number | Distance to offset the item's spawn location in the direction the mob is facing. | Sniffer: 2.25 |
| speed_multiplier | 1 | Decimal number | Searching movement speed multiplier. | Sniffer: 1.25 |
| target_blocks (Target Blocks) | [] | Array of Target Blocks items | List of target block types the goal will look to dig on. Overrides the default list. | Sniffer: ["minecraft:dirt","minecraft:coarse_dirt","minecraft:grass","minecraft:podzol","minecraft:dirt_with_roots","minecraft:moss_block","minecraft:pale_moss_block","minecraft:mud","minecraft:muddy_mangrove_roots"] |
| target_blocks (as String) | not set | String | ||
| target_blocks (as Object) | not set | Object | ||
| target_dig_position_offset | 2.25 | Decimal number | Dig target position offset from the feet position of the mob in their facing direction. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Legacy FloatRange
Legacy FloatRange Properties
JSON path: cooldown_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Decimal number | |
| min | 0 | Decimal number |
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_digging_start
| Name | Default Value | Type | Description |
|---|---|---|---|
| event | String | ||
| filters (Filters) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Filters item | Filters allow data objects to specify test criteria which allows their use. |
| filters (Alternate 1) | not set | Object | |
| target | self | Target 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_digging_start > 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. |
Target choices
| Value | Title | Description |
|---|---|---|
| baby | Baby | |
| block | Block | |
| damager | Damager | |
| holder | Holder | |
| item | Item | |
| other | Other | |
| parent | Parent | |
| player | Player | |
| self | Self | |
| target | Target |
Target Blocks
Target Blocks Properties
JSON path: target_blocks
| Name | Default Value | Type | Description |
|---|---|---|---|
| name | String | ||
| states | {} | Integer number | |
| states (as String) | not set | String | |
| states (as Boolean true/false) | not set | Boolean true/false | |
| tags | String |
Samples
Sniffer
"minecraft:behavior.random_search_and_dig": {
"priority": 5,
"speed_multiplier": 1.25,
"find_valid_position_retries": 5,
"target_blocks": [
"minecraft:dirt",
"minecraft:coarse_dirt",
"minecraft:grass",
"minecraft:podzol",
"minecraft:dirt_with_roots",
"minecraft:moss_block",
"minecraft:pale_moss_block",
"minecraft:mud",
"minecraft:muddy_mangrove_roots"
],
"goal_radius": 2,
"search_range_xz": 20,
"search_range_y": 3,
"cooldown_range": {
"min": 0,
"max": 0
},
"digging_duration_range": {
"min": 8,
"max": 10
},
"item_table": "loot_tables/gameplay/entities/sniffer_seeds.json",
"spawn_item_after_seconds": 6,
"spawn_item_pos_offset": 2.25,
"on_searching_start": {
"event": "on_searching_start",
"target": "self"
},
"on_fail_during_searching": {
"event": "on_fail_during_searching",
"target": "self"
},
"on_digging_start": {
"event": "on_digging_start",
"target": "self"
},
"on_item_found": {
"event": "on_item_found",
"target": "self"
},
"on_fail_during_digging": {
"event": "on_fail_during_digging",
"target": "self"
},
"on_success": {
"event": "on_search_and_digging_success",
"target": "self"
}
}
minecraft:behavior.random_sitting
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_sitting.md)
Allows the mob to randomly sit for a duration.
Entity Random Sitting Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| cooldown | 100 | Decimal number | Time in seconds the mob has to wait before using the goal again |
| cooldown_time | 0 | Decimal number | Time in seconds the mob has to wait before using the goal again |
| min_sit_time | 10 | Decimal number | The minimum amount of time in seconds before the mob will stand back up |
| 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. |
| start_chance | 0.10000000149011612 | Decimal number | This is the chance that the mob will start this goal, from 0 to 1 |
| stop_chance | 0.30000001192092896 | Decimal number | This is the chance that the mob will stop this goal, from 0 to 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
minecraft:behavior.random_stroll
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_stroll.md)
Allows a mob to randomly stroll around.
Entity Random Stroll Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| interval | 120 | Integer number | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal | |
| 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. | Blaze: 4, Bogged: 6 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Blaze: 1, Cave Spider: 0.8 |
| xz_dist | 10 | Integer number | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 | |
| y_dist | 7 | Integer number | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Blaze
"minecraft:behavior.random_stroll": {
"priority": 4,
"speed_multiplier": 1
}
Bogged
"minecraft:behavior.random_stroll": {
"priority": 6,
"speed_multiplier": 1
}
Cave Spider
"minecraft:behavior.random_stroll": {
"priority": 6,
"speed_multiplier": 0.8
}
minecraft:behavior.random_swim
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_random_swim.md)
Allows an entity to randomly move through water.
Entity Random Swim Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| avoid_surface | true | Boolean true/false | If true, the mob will avoid surface water blocks by swimming below them | |
| control_flags | [] | Control Flags choices | ||
| interval | 120 | Integer number | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal | Guardian: 80 |
| 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: 5, Elder Guardian: 7 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Elder Guardian: 0.5, Guardian: 1 |
| xz_dist | 10 | Integer number | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 | Dolphin: 20 |
| y_dist | 7 | Integer number | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Dolphin
"minecraft:behavior.random_swim": {
"priority": 5,
"interval": 0,
"xz_dist": 20
}
Elder Guardian
"minecraft:behavior.random_swim": {
"avoid_surface": false,
"speed_multiplier": 0.5,
"priority": 7
}
Guardian
"minecraft:behavior.random_swim": {
"avoid_surface": false,
"speed_multiplier": 1,
"interval": 80,
"priority": 7
}
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |