Entity AI goal reference (28/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.pet_sleep_with_owner
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_pet_sleep_with_owner.md)
Allows the pet mob to move onto a bed with its owner while sleeping.
[!Note] Requires a player to be set as the tame owner via taming (or the
tamecommand, or the tame API on EntityTameableComponent) in order to work properly.
Pet Sleep With Owner Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| goal_radius | 0.5 | Decimal number | Distance 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. |
| 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. |
| search_height | 1 | Integer number | Height in blocks from the owner the pet can be to sleep with owner. |
| search_range | 0 | Integer number | The distance in blocks from the owner the pet can be to sleep with owner. |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal |
Samples
minecraft:behavior.pickup_items
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_pickup_items.md)
Allows the mob to pick up items on the ground.
Entity Pickup Items Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| can_pickup_any_item | false | Boolean true/false | If true, the mob can pick up any item | Bogged: true |
| can_pickup_to_hand_or_equipment | true | Boolean true/false | If true, the mob can pick up items to its hand or armor slots | |
| control_flags | [] | Control Flags choices | ||
| cooldown_after_being_attacked | 0 | Integer number | Time in seconds the mob cannot pickup items after being attacked | |
| excluded_items | [] | String | List of items this mob will not pick up | Bogged: [{"tags":"q.all_tags('minecraft:is_spear')"}], Drowned: [{"name":"minecraft:glow_ink_sac"},{"tags":"q.all_tags('minecraft:is_spear')"}] |
| excluded_items (as Keyed set of strings) | not set | Keyed set of strings | ||
| goal_radius | 0.5 | Decimal number | Distance 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. | Allay: 2.2, Bogged: 2 |
| max_dist | 1 | Integer number | Maximum distance this mob will look for items to pick up | Allay: 32, Bogged: 3 |
| on_pickup_item_end | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Pickup Item End item | Event to run when this mob either finishes or loses interest in picking up an item. This item requires a format version of at least 1.26.20. | |
| on_pickup_item_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Pickup Item Start item | Event to run when this mob moves to pick up an item. This item requires a format version of at least 1.26.20. | |
| pickup_based_on_chance | false | Boolean true/false | If true, depending on the difficulty, there is a random chance that the mob may not be able to pickup items | Bogged: true |
| pickup_same_items_as_in_hand | false | Boolean true/false | If true, the mob will only pick up items that match what it is already holding. | Allay: true |
| 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: 2, Bogged: 5, Drowned: 6 |
| search_height | 1 | Integer number | Height in blocks the mob will search for items | Allay: 32 |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this AI Goal | Allay: 6, Bogged: 1 |
| stop_if_holding_item | false | Boolean true/false | If true, the mob will not begin a pickup goal while it is already holding an item. Useful for mobs that should only hold one item at a time. This item requires a format version of at least 1.26.30. | |
| track_target | false | Boolean true/false | If true, this mob will chase after the target as long as it's a valid target |
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_pickup_item_end
| 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_pickup_item_end > 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 |
Samples
Allay
"minecraft:behavior.pickup_items": {
"can_pickup_any_item": false,
"search_height": 32,
"priority": 2,
"goal_radius": 2.2,
"can_pickup_to_hand_or_equipment": false,
"max_dist": 32,
"pickup_based_on_chance": false,
"pickup_same_items_as_in_hand": true,
"speed_multiplier": 6
}
Bogged
"minecraft:behavior.pickup_items": {
"can_pickup_any_item": true,
"excluded_items": [
{
"tags": "q.all_tags('minecraft:is_spear')"
}
],
"pickup_based_on_chance": true,
"goal_radius": 2,
"priority": 5,
"max_dist": 3,
"speed_multiplier": 1
}
Drowned
"minecraft:behavior.pickup_items": {
"can_pickup_any_item": true,
"excluded_items": [
{
"name": "minecraft:glow_ink_sac"
},
{
"tags": "q.all_tags('minecraft:is_spear')"
}
],
"pickup_based_on_chance": true,
"goal_radius": 2,
"priority": 6,
"max_dist": 3,
"speed_multiplier": 1
}
Parched
"minecraft:behavior.pickup_items": {
"can_pickup_any_item": true,
"excluded_items": [
{
"tags": "q.all_tags('minecraft:is_spear')"
}
],
"pickup_based_on_chance": true,
"goal_radius": 2,
"priority": 6,
"max_dist": 3,
"speed_multiplier": 1
}
minecraft:behavior.place_block
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_place_block.md)
The original has no description. See the property table.
Contents
- Can Place
- Entity ActorDefinitionTrigger
- Placeable Carried Blocks
- Entity PlaceBlockGoalWeightedBlockDescriptor
- Block IntRange
AI goal that makes entities place blocks into the world, like Endermen placing their carried block or snow golems leaving snow trails. Configure which blocks can be placed, where they can be placed, and how often the entity attempts placement. Creates mobs that modify the environment.
[!Note] This item requires a format version of at least 1.21.100.
Entity Place 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. |
| can_place (Can Place) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Can Place item | Filters for if the entity should try to place its block. Self and Target are set. |
| can_place (Alternate 1) | not set | Object | |
| chance | 1 | Decimal number | Chance each tick for the entity to try and place a block. Value must be <= 1. |
| control_flags | [] | Control Flags choices | |
| on_place | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Place item | Trigger ran if the entity does place its block. Self, Target, and Block are set. |
| placeable_carried_blocks (Placeable Carried Blocks) | [] | Array of Placeable Carried Blocks items | Block descriptors for which blocks are valid to be placed from the entity's carried item, if empty all blocks are valid. |
| placeable_carried_blocks (as String) | not set | String | |
| placeable_carried_blocks (as Object) | not set | Object | |
| 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. |
| randomly_placeable_blocks | [] | Array of Randomly Placeable Blocks items | Weighted block descriptors for which blocks should be randomly placed, if empty the entity will try to place its carried block from placeable_carried_blocks. |
| xz_range | {"max":2,"min":-2} | Xz Range item | XZ range from which the entity will try and place blocks in. |
| y_range | {"max":3,"min":0} | y Range item | Y range from which the entity will try and place blocks in. |
Can Place
Can Place Properties
JSON path: can_place
| 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_place
| 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_place > 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 |
Placeable Carried Blocks
Placeable Carried Blocks Properties
JSON path: placeable_carried_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 |
Entity PlaceBlockGoalWeightedBlockDescriptor
Entity PlaceBlockGoalWeightedBlockDescriptor Properties
JSON path: randomly_placeable_blocks
| Name | Default Value | Type | Description |
|---|---|---|---|
| block (Block) | {"name":"","states":{},"tags":""} | Block item | Block descriptor for this entry. |
| block (as String) | not set | String | |
| block (Alternate 2) | not set | Object | |
| filter (Filter) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Filter item | Filter for if this entry should be randomly selected from. Self, Target, and Block are set. |
| filter (Alternate 1) | not set | Object | |
| weight | 1 | Integer number | Weight for this entry. |
Block
Block Properties
JSON path: randomly_placeable_blocks > block
| 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 |
Filter
Filter Properties
JSON path: randomly_placeable_blocks > filter
| 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. |
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.play
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_play.md)
Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.
[!Note] Can only be used on the following type of entity:
- Villager (minecraft:villager)
Entity Play Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| chance_to_start | 0.0024999999441206455 | Decimal number | Percent chance that the mob will start this goal, from 0 to 1. Value must be <= 1. |
| control_flags | [] | Control Flags choices | |
| follow_distance | 2 | Integer number | The distance (in blocks) that the mob tries to be in range of the friend it's following. |
| friend_search_area | [6, 3, 6] | Array of numbers | The dimensions of the AABB used to search for a potential friend to play with. |
| friend_search_area (Friend Search Area) | not set | Friend Search Area (Friend Search Area) item | |
| friend_types | [] | Array of objects | The entity type(s) to consider when searching for a potential friend to play with. |
| friend_types (Friend Types) | not set | Friend Types (Friend Types) item | |
| max_play_duration_seconds | 50 | Decimal number | The max amount of seconds that the mob will play for before exiting the 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. |
| random_pos_search_height | 3 | Integer number | The height (in blocks) that the mob will search within to find a random position position to move to. Must be at least 1. Value must be >= 1. |
| random_pos_search_range | 16 | Integer number | The distance (in blocks) on ground that the mob will search within to find a random position to move to. Must be at least 1. Value must be >= 1. |
| 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 |
Friend Search Area (Friend Search Area)
Friend Search Area Properties
JSON path: friend_search_area
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number | |
| z | 0 | Decimal number |
Friend Types (Friend Types)
Friend Types Properties
JSON path: friend_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: friend_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
minecraft:behavior.play_dead
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_play_dead.md)
Allows this entity to pretend to be dead to avoid being targeted by attackers.
Entity Play Dead Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| apply_regeneration | false | Boolean true/false | Whether the mob will receive the regeneration effect while playing dead. |
| control_flags | [] | Control Flags choices | |
| damage_sources | [] | Damage Sources choices | The list of Entity Damage Sources that will cause this mob to play dead. |
| duration | 1 | Decimal number | The amount of time the mob will remain playing dead (in seconds). |
| filters (Filters) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Filters item | The list of other triggers that are required for the mob to activate play dead |
| filters (Alternate 1) | not set | Object | |
| force_below_health | 0 | Integer number | The amount of health at which damage will cause the mob to play dead. |
| 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. |
| random_damage_range | {"max":0,"min":0} | Random Damage Range item | The range of damage that may cause the goal to start depending on randomness. |
| random_start_chance | 1 | Decimal number | The likelihood of this goal starting upon taking damage. |
random_damage_range
The range of damage that may cause the goal to start depending on randomness. Damage taken below the min will never cause the goal to start. Damage taken above the max will always cause the goal to start.
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Damage Sources choices
| Value | Title | Description |
|---|---|---|
| all | All | |
| anvil | Anvil | |
| block_explosion | Block explosion | |
| campfire | Campfire | |
| charging | Charging | |
| contact | Contact | |
| drowning | Drowning | |
| entity_attack | Entity attack | |
| entity_explosion | Entity explosion | |
| fall | Fall | |
| falling_block | Falling block | |
| fire | Fire | |
| fire_tick | Fire tick | |
| fireworks | Fireworks | |
| fly_into_wall | Fly into wall | |
| freezing | Freezing | |
| lava | Lava | |
| lightning | Lightning | |
| mace_smash | Mace smash | |
| magic | Magic | |
| magma | Magma | |
| none | None | |
| override | Override | |
| piston | Piston | |
| projectile | Projectile | |
| ram_attack | Ram attack | |
| self_destruct | Self destruct | |
| sonic_boom | Sonic boom | |
| soul_campfire | Soul campfire | |
| stalactite | Stalactite | |
| stalagmite | Stalagmite | |
| starve | Starve | |
| suffocation | Suffocation | |
| temperature | Temperature | |
| thorns | Thorns | |
| void | Void | |
| wither | Wither |
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. |
Block IntRange
Block IntRange Properties
JSON path: random_damage_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Integer number | |
| min | 0 | Integer number |
Samples
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |