Entity AI goal reference (13/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.drink_potion
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_drink_potion.md)
Allows the mob to drink potions based on specified environment conditions.
Entity Drink Potion Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| potions | [] | Array of Potions items | A list of potions that this entity can drink. Each potion entry has the following parameters: |
| 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_modifier | 0 | Decimal number | The movement speed modifier to apply to the entity while it is drinking a potion. A value of 0 represents no change in speed. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Entity DrinkPotionGoalDefinition PotionData
Entity DrinkPotionGoalDefinition PotionData Properties
JSON path: potions
| Name | Default Value | Type | Description |
|---|---|---|---|
| chance | 1 | Decimal number | The percent chance (from 0.0 to 1.0) of this potion being selected when searching for a potion to use. |
| filters (Filters) | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Filters item | The filters to use when determining if this potion can be selected. |
| filters (Alternate 1) | not set | Object | |
| id | -1 | Integer number | The registry ID of the potion to use |
Filters
Filters Properties
JSON path: potions > 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.drop_item_for
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_drop_item_for.md)
Allows the entity to move toward a target, and drop an item near the target.
[!Note] Requires the following component in order to work properly:
- Navigation (minecraft:navigation)
Entity Drop Item For Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| cooldown | 0.25 | Decimal number | Total time that the goal is on cooldown before it can be used again. |
| drop_item_chance | 1 | Decimal number | The percent chance the entity will drop an item when using this goal. Value must be <= 1. |
| entity_types | [] | Array of objects | The list of conditions another entity must meet to be a valid target to drop an item for. |
| entity_types (Entity Types) | not set | Entity Types (Entity Types) item | |
| 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. Value must be > 0. |
| loot_table | String | The loot table that contains the possible loot the entity can drop with this goal. | |
| max_head_look_at_height | 10 | Decimal number | The maximum height the entities head will look at when dropping the item. The entity will always be looking at its target. |
| minimum_teleport_distance | 2 | Decimal number | If the target position is farther away than this distance on any tick, the entity will teleport to the target position. |
| offering_distance | 1 | Decimal number | The preferred distance the entity tries to be from the target it is dropping an item for. |
| on_drop_attempt | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Drop Attempt item | The event to trigger when the entity attempts to drop an item. |
| 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_count | 0 | 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 entity will search within to find a valid target position. Value must be > 0. |
| search_range | 0 | Integer number | The distance in blocks the entity will search within to find a valid target position. Value must be > 0. |
| seconds_before_pickup | 0 | Decimal number | The numbers of seconds that will pass before the dropped entity can be picked up from the ground. |
| speed_multiplier | 1 | Decimal number | Movement speed multiplier of the mob when using this goal. |
| target_range | [1, 1, 1] | Array of numbers | The range in blocks within which the entity searches to find a target to drop an item for. |
| target_range (Target Range) | not set | Target Range (Target Range) item | |
| teleport_offset | [0, 1, 0] | Array of numbers | When the entity teleports, offset the teleport position by this many blocks in the X, Y, and Z coordinate. |
| teleport_offset (Teleport Offset) | not set | Teleport Offset (Teleport Offset) item | |
| time_of_day_range | {"max":1,"min":0} | Time Of Day Range item | The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0. |
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 |
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. |
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_drop_attempt
| 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 |
Target Range (Target Range)
Target Range Properties
JSON path: target_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number | |
| z | 0 | Decimal number |
Teleport Offset (Teleport Offset)
Same structure as Target Range (Target Range).
Legacy FloatRange
Legacy FloatRange Properties
JSON path: time_of_day_range
| Name | Default Value | Type | Description |
|---|---|---|---|
| max | 0 | Decimal number | |
| min | 0 | Decimal number |
Samples
minecraft:behavior.eat_block
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_eat_block.md)
Allows the entity to consume a block, replace the eaten block with another block, and trigger an event as a result.
Entity Eat Block Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| eat_and_replace_block_pairs | [[object Object], [object Object], [object Object]] | Array of Eat And Replace Block Pairs items | A collection of pairs of blocks; the first ("eat_block") is the block the entity should eat, the second ("replace_block") is the block that should replace the eaten block. | Sheep: [{"eat_block":"grass","replace_block":"dirt"},{"eat_block":"tallgrass","replace_block":"air"},{"eat_block":"short_dry_grass","replace_block":"air"},{"eat_block":"tall_dry_grass","replace_block":"air"}] |
| on_eat | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Eat item | The event to trigger when the block eating animation has completed. | Sheep: {"event":"minecraft:on_eat_block","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. | Sheep: 6 |
| success_chance | 0.019999999552965164 | Keyed set of strings | A molang expression defining the success chance the entity has to consume a block. | Sheep: "query.is_baby ? 0.02 : 0.001" |
| success_chance (as Named set of objects) | not set | Key/item pairs of Success Chance (Legacy Molang Expression) items | ||
| success_chance (as Decimal number) | not set | Decimal number | ||
| time_until_eat | 1.7999999523162842 | Decimal number | The amount of time (in seconds) it takes for the block to be eaten upon a successful eat attempt. | Sheep: 1.8 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Entity EatAndReplaceBlockPair
Entity EatAndReplaceBlockPair Properties
JSON path: eat_and_replace_block_pairs
| Name | Default Value | Type | Description |
|---|---|---|---|
| eat_block | String | The block the entity should eat. | |
| replace_block | String | The block that should replace the eaten block. |
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_eat
| 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_eat > 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 |
Legacy Molang Expression
Legacy Molang Expression Properties
JSON path: success_chance
| Name | Default Value | Type | Description |
|---|---|---|---|
| expression | not set | String | |
| version | not set | Integer number |
Samples
Sheep
"minecraft:behavior.eat_block": {
"priority": 6,
"success_chance": "query.is_baby ? 0.02 : 0.001",
"time_until_eat": 1.8,
"eat_and_replace_block_pairs": [
{
"eat_block": "grass",
"replace_block": "dirt"
},
{
"eat_block": "tallgrass",
"replace_block": "air"
},
{
"eat_block": "short_dry_grass",
"replace_block": "air"
},
{
"eat_block": "tall_dry_grass",
"replace_block": "air"
}
],
"on_eat": {
"event": "minecraft:on_eat_block",
"target": "self"
}
}
minecraft:behavior.eat_carried_item
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_eat_carried_item.md)
If the mob is carrying a food item, the mob will eat it and the effects will be applied to the mob.
[!Note] Requires food items to be in the entity's inventory in order to eat the food.
Entity Eat Carried Item Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| control_flags | [] | Control Flags choices | |
| delay_before_eating | 0 | Decimal number | Time in seconds the mob should wait before eating the item. |
| 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. |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.eat_mob
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_eat_mob.md)
Allows the entity to eat a specified Mob.
Entity Eat Mob Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| eat_animation_time | 1 | Decimal number | Sets the time in seconds the eat animation should play for. | Frog: 0.3 |
| eat_mob_sound | String | Sets the sound that should play when eating a mob. | Frog: "tongue" | |
| loot_table | String | The loot table for loot to be dropped when eating a mob. | Frog: "loot_tables/entities/frog.json" | |
| 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. | Frog: 7 |
| pull_in_force | 1 | Decimal number | Sets the force which the mob-to-be-eaten is pulled towards the eating mob. | Frog: 0.75 |
| reach_mob_distance | 1 | Decimal number | Sets the desired distance to be reached before eating the mob. | Frog: 1.75 |
| run_speed | 1 | Decimal number | Sets the entity's speed when running toward the target. | Frog: 2 |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
Frog
"minecraft:behavior.eat_mob": {
"run_speed": 2,
"eat_animation_time": 0.3,
"pull_in_force": 0.75,
"reach_mob_distance": 1.75,
"eat_mob_sound": "tongue",
"loot_table": "loot_tables/entities/frog.json",
"priority": 7
}
minecraft:behavior.emerge
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_emerge.md)
Allows this entity to emerge from the ground.
Entity Emerge Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| cooldown_time | 0.5 | Decimal number | Time in seconds the mob has to wait before using the goal again | |
| duration | 5 | Decimal number | Goal duration in seconds | Warden: 7 |
| on_done | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Done item | Trigger to be executed when the goal execution is about to end | Warden: {"event":"minecraft:emerged","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. |
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_done
| 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_done > 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
Warden
"minecraft:behavior.emerge": {
"duration": 7,
"on_done": {
"event": "minecraft:emerged",
"target": "self"
}
}
minecraft:behavior.enderman_leave_block
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_enderman_leave_block.md)
Allows the enderman to drop a block they are carrying.
[!Note] Can only be used on the following type of entity:
- Enderman (minecraft:enderman)
Enderman Leave Block Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| 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. |
minecraft:behavior.enderman_take_block
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_enderman_take_block.md)
Allows the enderman to take a block and carry it around.
[!Note] Can only be used on the following type of entity:
- Enderman (minecraft:enderman)
Enderman Take Block Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| 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. |
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |