Entity AI goal reference (37/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.swell
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swell.md)
Allows the creeper to swell up when a player is nearby. It can only be used by Creepers.
Entity Swell Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| 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. |
| start_distance | 10 | Decimal number | This mob starts swelling when a target is at least this many blocks away. |
| stop_distance | 2 | Decimal number | This mob stops swelling when a target has moved away at least this many blocks. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.swim_idle
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swim_idle.md)
Allows the entity go idle, if swimming. Entity must be in water.
Entity Swim Idle Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| idle_time | 5 | Decimal number | Amount of time (in seconds) to stay idle. |
| 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. |
| success_rate | 0.10000000149011612 | Decimal number | Percent chance this entity will go idle, 1.0 = 100%. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.swim_up_for_breath
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swim_up_for_breath.md)
Allows the mob to try to move to air once it is close to running out of its total breathable supply. Requires "minecraft:breathable".
[!Note] This item requires a format version of at least 1.21.20.
Entity Swim Up For Breath Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| material_type | water | String | The material the mob is traveling in. An air block will only be considered valid to move to with a block of this material below it. Options are: "water", "lava", or "any". | |
| 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: 1 |
| search_height | 16 | Integer number | The height (in blocks) above the mob's current position that it will search for a valid air block to move to. | |
| search_radius | 4 | Integer number | The radius (in blocks) around the mob's current position that it will search for a valid air block to move to. | |
| speed_mod | 1.399999976158142 | Decimal number | Movement speed multiplier of the mob when using this goal. |
search_height
The height (in blocks) above the mob's current position that it will search for a valid air block to move to. If a valid block cannot be found, the mob will move to the position this many blocks above it.
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Dolphin
"minecraft:behavior.swim_up_for_breath": {
"priority": 1
}
minecraft:behavior.swim_wander
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swim_wander.md)
Allows the entity to wander around while swimming, when not path-finding.
Entity Swim Wander Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| interval | 0.008329999633133411 | Decimal number | Percent chance to start wandering, when not path-finding. 1 = 100% |
| look_ahead | 5 | Decimal number | Distance to look ahead for obstacle avoidance, while wandering. |
| 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 | This multiplier modifies the entity's speed when wandering. |
| wander_time | 5 | Decimal number | Amount of time (in seconds) to wander after wandering behavior was successfully started. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.swim_with_entity
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swim_with_entity.md)
Allows the entity follow another entity. Both entities must be swimming [ie, in water].
Swim With Entity Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| catch_up_multiplier | 2.5 | Decimal number | The multiplier this entity's speed is modified by when matching another entity's direction. | Dolphin: 2.5 |
| catch_up_threshold | 12 | Decimal number | Distance, from the entity being followed, at which this entity will speed up to reach that entity. | Dolphin: 12 |
| chance_to_stop | 0.0333 | Decimal number | Percent chance to stop following the current entity, if they're riding another entity or they're not swimming. 1.0 = 100% | Dolphin: 0.0333 |
| entity_types | not set | Array of strings | Filters which types of entities are valid to follow. | Dolphin: [{"filters":{"test":"is_family","subject":"other","value":"player"}}] |
| match_direction_threshold | 2 | Decimal number | Distance, from the entity being followed, at which this entity will try to match that entity's direction | Dolphin: 2 |
| priority | not set | 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: 4 |
| search_range | 20 | Decimal number | Radius around this entity to search for another entity to follow. | Dolphin: 20 |
| speed_multiplier | 1.5 | Decimal number | The multiplier this entity's speed is modified by when trying to catch up to the entity being followed. | Dolphin: 1.5 |
| state_check_interval | 0.5 | Decimal number | Time (in seconds) between checks to determine if this entity should catch up to the entity being followed or match the direction of the entity being followed. | Dolphin: 0.5 |
| stop_distance | 5 | Decimal number | Distance, from the entity being followed, at which this entity will stop following that entity. | Dolphin: 5 |
| success_rate | 0.1 | Decimal number | Percent chance to start following another entity, if not already doing so. 1.0 = 100% | Dolphin: 0.1 |
Samples
Dolphin
"minecraft:behavior.swim_with_entity": {
"priority": 4,
"success_rate": 0.1,
"chance_to_stop": 0.0333,
"state_check_interval": 0.5,
"catch_up_threshold": 12,
"match_direction_threshold": 2,
"catch_up_multiplier": 2.5,
"speed_multiplier": 1.5,
"search_range": 20,
"stop_distance": 5,
"entity_types": [
{
"filters": {
"test": "is_family",
"subject": "other",
"value": "player"
}
}
]
}
minecraft:behavior.swoop_attack
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_swoop_attack.md)
Allows an entity to attack using swoop attack behavior; Ideal for use with flying mobs. The behavior ends if the entity has a horizontal collision or gets hit.
Entity Swoop Attack Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| damage_reach | 0.20000000298023224 | Decimal number | Added to the base size of the entity, to determine the target's maximum allowable distance, when trying to deal attack damage. | |
| delay_range | {"max":20,"min":10} | Delay Range item | Minimum and maximum cooldown time-range (in seconds) between each attempted swoop attack. | |
| 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. | Phantom: 2 |
| speed_multiplier | 1 | Decimal number | During swoop attack behavior, this determines the multiplier the entity's speed is modified by when moving toward the target. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Legacy FloatRange
Legacy FloatRange Properties
JSON path: delay_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Decimal number | |
| min | 0 | Decimal number |
Samples
Phantom
"minecraft:behavior.swoop_attack": {
"priority": 2
}
minecraft:behavior.take_block
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_take_block.md)
AI goal that makes entities pick up blocks from the world, like Endermen grabbing blocks to carry. Configure which blocks the entity can take and the search radius. Works with place_block behavior to create entities that relocate blocks or harvest materials from the environment.
[!Note] This item requires a format version of at least 1.21.100.
Entity Take Block Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| affected_by_griefing_rule | true | Boolean true/false | If true, whether the goal is affected by the mob griefing game rule. |
| blocks (Blocks) | [] | Array of Blocks items | Block descriptors for which blocks are valid to be taken by the entity, if empty all blocks are valid. |
| blocks (as String) | not set | String | |
| blocks (as Object) | not set | Object | |
| can_take (Can Take) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Can Take item | Filters for if the entity should try to take a block. Self and Target are set. |
| can_take (Alternate 1) | not set | Object | |
| chance | 1 | Decimal number | Chance each tick for the entity to try and take a block. Value must be <= 1. |
| control_flags | [] | Control Flags choices | |
| on_take | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Take item | Trigger ran if the entity does take a block. Self, Target, and Block are set. |
| 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. |
| requires_line_of_sight | true | Boolean true/false | If true, whether the entity needs line of sight to the block they are trying to take. |
| xz_range | {"max":2,"min":-2} | Xz Range item | XZ range from which the entity will try and take blocks from. |
| y_range | {"max":3,"min":0} | y Range item | Y range from which the entity will try and take blocks from. |
Blocks
Blocks Properties
JSON path: 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 |
Can Take
Can Take Properties
JSON path: can_take
| 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. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
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_take
| 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_take > 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 |
Block IntRange
Block IntRange Properties
JSON path: xz_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Integer number | |
| min | 0 | Integer number |
Samples
minecraft:behavior.take_flower
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_take_flower.md)
Allows the mob to accept flowers from another mob with the minecraft:offer_flower behavior.
[!Note] Can only be used on the following type of entity:
- Villager (minecraft:villager)
Entity Take Flower Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| 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. |
| filters (Alternate 1) | not set | Object | |
| max_head_rotation_y | 30 | Decimal number | Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Value must be > 0. |
| max_rotation_x | 30 | Decimal number | Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Value must be > 0. |
| max_wait_time | 20 | Decimal number | The maximum amount of time (in seconds) for the mob to randomly wait for before taking the flower. |
| min_distance_to_target | 2 | Decimal number | Minimum distance (in blocks) for the entity to be considered having reached its target. Value must be > 0. |
| min_wait_time | 4 | Decimal number | The minimum amount of time (in seconds) for the mob to randomly wait for before taking the flower. |
| on_take_flower | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Take Flower item | Event triggered when the entity takes a flower from another entity. |
| 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_area | [6, 2, 6] | Array of numbers | The dimensions of the AABB used to search for a potential mob to take a flower from. |
| search_area (Search Area) | not set | Search Area (Search Area) item | |
| speed_multiplier | 0.5 | 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 |
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. |
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_take_flower
| 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.
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 |
Search Area (Search Area)
Search Area Properties
JSON path: search_area
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number | |
| z | 0 | Decimal number |
Samples
minecraft:behavior.target_when_pushed
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_target_when_pushed.md)
Allows the mob to target another mob when it is pushed by that mob.
Entity Target When Pushed Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| entity_types | [] | Array of objects | List of entity types that can trigger this mob to begin targeting | Iron Golem: [{"filters":{"all_of":[{"subject":"other","test":"is_family","value":"monster"},{"operator":"not","test":"is_family","subject":"other","value":"creeper"}]}}] |
| entity_types (Entity Types) | not set | Entity Types (Entity Types) item | ||
| percent_chance | 0 | Decimal number | The probability that the mob will target another mob when pushed. A value of 100 is 100% | Iron Golem: 5 |
| priority | 0 | Integer number | Iron Golem: 1 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Entity Types (Entity Types)
Entity Types Properties
JSON path: entity_types
| Name | Default Value | Type | Description |
|---|---|---|---|
| check_if_outnumbered | false | Boolean true/false | If true, the mob will check if its outnumbered |
| cooldown | 0 | Integer number | The amount of time in seconds that the mob has to wait before selecting a target of the same type again |
| 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 make this entry in the list valid |
| filters (Alternate 1) | not set | Object | |
| max_dist | 16 | Decimal number | Maximum distance this mob can be away to be a valid choice |
| max_flee | 10 | Decimal number | Maximum distance this mob can be from the target to stop fleeing |
| max_height | -1 | Decimal number | Maximum height this mob can be away to be a valid choice |
| must_see | not set | Boolean true/false | If true, the mob has to be visible to be a valid choice |
| must_see_forget_duration | 3 | Integer number | Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more |
| priority | 0 | Integer number | Priority for this mob type |
| reevaluate_description | false | Boolean true/false | If true, the mob will stop being targeted if it stops meeting any conditions. |
| sprint_speed_multiplier | 1 | Decimal number | Multiplier for the sprinting speed. A value of 1.0 means the speed is unchanged |
| walk_speed_multiplier | 1 | Decimal number | Multiplier for the walking speed. A value of 1.0 means the speed is unchanged |
Filters
Filters Properties
JSON path: entity_types > 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. |
Samples
Iron Golem
"minecraft:behavior.target_when_pushed": {
"entity_types": [
{
"filters": {
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "monster"
},
{
"operator": "not",
"test": "is_family",
"subject": "other",
"value": "creeper"
}
]
}
}
],
"percent_chance": 5,
"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 |