Entity AI goal reference (40/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.timer_flag_1
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_timer_flag_1.md)
Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_1 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.
[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON.
cooldown_rangeandduration_rangenow only accept an object withminandmaxvalues; the previous single-number shorthand is no longer accepted in 1.26.0 and newer.
[!Note] This item requires a format version of at least 1.20.40.
Entity Timer Flag 1 Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | Sniffer: ["move","look"] | |
| cooldown_range (Legacy FloatRange) | {"max":0,"min":0} | Cooldown Range item | Goal cooldown range in seconds. Can be a range object or a single number. | Sniffer: {"min":400,"max":500} |
| cooldown_range (as Decimal number) | not set | Decimal number | ||
| duration_range (Legacy FloatRange) | {"max":0,"min":0} | Duration Range item | Goal duration range in seconds. Can be a range object or a single number. | Sniffer: {"min":2,"max":2} |
| duration_range (as Decimal number) | not set | Decimal number | ||
| on_end | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | End item | Event(s) to run when the goal ends. | Sniffer: {"event":"on_scenting_success","target":"self"} |
| on_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Start item | Event(s) to run when the goal starts. | |
| 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: 6 |
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_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_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
Sniffer
"minecraft:behavior.timer_flag_1": {
"priority": 6,
"control_flags": [
"move",
"look"
],
"cooldown_range": {
"min": 400,
"max": 500
},
"duration_range": {
"min": 2,
"max": 2
},
"on_end": {
"event": "on_scenting_success",
"target": "self"
}
}
minecraft:behavior.timer_flag_2
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_timer_flag_2.md)
Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_2 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.
[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON.
cooldown_rangeandduration_rangenow only accept an object withminandmaxvalues; the previous single-number shorthand is no longer accepted in 1.26.0 and newer.
[!Note] This item requires a format version of at least 1.20.40.
Entity Timer Flag 2 Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | Sniffer: ["move"] | |
| cooldown_range (Legacy FloatRange) | {"max":0,"min":0} | Cooldown Range item | Goal cooldown range in seconds. Can be a range object or a single number. | Sniffer: {"min":0,"max":0} |
| cooldown_range (as Decimal number) | not set | Decimal number | ||
| duration_range (Legacy FloatRange) | {"max":0,"min":0} | Duration Range item | Goal duration range in seconds. Can be a range object or a single number. | Sniffer: {"min":2,"max":5} |
| duration_range (as Decimal number) | not set | Decimal number | ||
| on_end | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | End item | Event(s) to run when the goal ends. | Sniffer: {"event":"on_rising_end","target":"self"} |
| on_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Start item | Event(s) to run when the goal starts. | |
| 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: 2 |
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_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_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
Sniffer
"minecraft:behavior.timer_flag_2": {
"priority": 2,
"control_flags": [
"move"
],
"cooldown_range": {
"min": 0,
"max": 0
},
"duration_range": {
"min": 2,
"max": 5
},
"on_end": {
"event": "on_rising_end",
"target": "self"
}
}
minecraft:behavior.timer_flag_3
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_timer_flag_3.md)
Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_3 will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.
[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON.
cooldown_rangeandduration_rangenow only accept an object withminandmaxvalues; the previous single-number shorthand is no longer accepted in 1.26.0 and newer.
[!Note] This item requires a format version of at least 1.20.40.
Entity Timer Flag 3 Behavior Properties
| Name | Default Value | Type | Description | Example Values |
|---|---|---|---|---|
| control_flags | [] | Control Flags choices | ||
| cooldown_range (Legacy FloatRange) | {"max":0,"min":0} | Cooldown Range item | Goal cooldown range in seconds. Can be a range object or a single number. | Sniffer: {"min":0,"max":0} |
| cooldown_range (as Decimal number) | not set | Decimal number | ||
| duration_range (Legacy FloatRange) | {"max":0,"min":0} | Duration Range item | Goal duration range in seconds. Can be a range object or a single number. | Sniffer: {"min":2,"max":5} |
| duration_range (as Decimal number) | not set | Decimal number | ||
| on_end | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | End item | Event(s) to run when the goal ends. | Sniffer: {"event":"on_feeling_happy_end","target":"self"} |
| on_start | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Start item | Event(s) to run when the goal starts. | |
| 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 |
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_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_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
Sniffer
"minecraft:behavior.timer_flag_3": {
"priority": 5,
"cooldown_range": {
"min": 0,
"max": 0
},
"duration_range": {
"min": 2,
"max": 5
},
"on_end": {
"event": "on_feeling_happy_end",
"target": "self"
}
}
minecraft:behavior.trade_interest
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_trade_interest.md)
Allows the mob to look at a player that is holding a tradable item.
Entity Trade Interest Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| carried_item_switch_time | 2 | Decimal number | The max time in seconds that the trader will hold an item before attempting to switch for a different item that takes the same trade |
| control_flags | [] | Control Flags choices | |
| cooldown | 2 | Decimal number | The time in seconds before the trader can use this goal again |
| interest_time | 45 | Decimal number | The max time in seconds that the trader will be interested with showing its trade items |
| 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. |
| remove_item_time | 1 | Decimal number | The max time in seconds that the trader will wait when you no longer have items to trade |
| within_radius | 0 | Decimal number | Distance in blocks this mob can be interested by a player holding an item they like |
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Samples
minecraft:behavior.trade_with_player
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_trade_with_player.md)
Allows the player to trade with this mob. When the goal starts, it will stop the mob's navigation.
Trade With Player Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| filters | not set | Minecraft filter | Conditions that need to be met for the behavior to start. |
| max_distance_from_player | 8 | Decimal number | The max distance that the mob can be from the player before exiting the goal. |
| 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. |
Samples
minecraft:behavior.transport_items
(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_transport_items.md)
A behavior that enables a mob to transport items from and to containers.
Entity Transport Items Behavior Properties
| Name | Default Value | Type | Description |
|---|---|---|---|
| allow_simultaneous_interaction | false | Boolean true/false | When true the mob will wait until a container is not used by other entities before starting to interact with it. |
| allowed_items | [] | String | A list of item descriptors that are the only items the mob is allowed to transport. |
| allowed_items (as Keyed set of strings) | not set | Keyed set of strings | |
| control_flags | [] | Control Flags choices | |
| destination_container_types (Destination Container Types) | [] | Destination Container Types item | A list of block descriptors that should be container types to put items in. Can be simple block identifier strings or objects with name, states, and tags. |
| destination_container_types (Destination Container Type) | not set | Array of Destination Container Types (Destination Container Type) items | |
| disallowed_items | [] | String | A list of item descriptors that are the mob is not allowed to transport. If non-empty "allowed_items" must be empty. |
| disallowed_items (as Keyed set of strings) | not set | Keyed set of strings | |
| idle_cooldown | 20 | Integer number | When the mob cannot find a container in which to get or put items, the goal will stop being active for this amount of time in seconds. |
| initial_cooldown | 0 | Integer number | How long the mob will wait after spawning or getting the goal added before the goal can start. |
| interaction_time | 3 | Decimal number | The amount of time in seconds spent interacting with the containers. |
| max_stack_size | 64 | Integer number | The maximum stack size that the mob will try to take from a container. Value must be >= 1. Value must be <= 64. |
| max_visited_containers | 16 | Integer number | The maximum number of containers that the mob will try to take/place items from before going on cooldown and starting over. |
| place_strategy | any | Place Strategy choices | The strategy to use for placing the transported item. |
| priority | 0 | Integer number | |
| search_distance | [64, 32] | Array of numbers | The maximum search distance horizontally and vertically at which to find containers for taking or placing items. |
| search_distance (Search Distance) | not set | Search Distance (Search Distance) item | |
| search_strategy | random | Search Strategy choices | The strategy to use for finding source or destination containers. The nearest valid container or a random valid container in range. |
| source_container_types (Source Container Types) | [] | Source Container Types item | A list of block descriptors that should be container types to take items from. Can be simple block identifier strings or objects with name, states, and tags. |
| source_container_types (Source Container Type) | not set | Array of Source Container Types (Source Container Type) items |
allowed_items
A list of item descriptors that are the only items the mob is allowed to transport. If this and "disallowed_items" are both empty, then all items are allowed. If non-empty "disallowed_items" must be empty.
place_strategy
The strategy to use for placing the transported item. Any - always place if there is room, With matching - place if there is a matching item in the container, With matching or empty - like With matching but will also place in empty containers.
Control Flags choices
| Value | Title | Description |
|---|---|---|
| jump | Jump | |
| look | Look | |
| move | Move |
Destination Container Types
Destination Container Types Properties
JSON path: destination_container_types
| 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 |
Destination Container Types (Destination Container Type)
Destination Container Type Properties
JSON path: destination_container_types
| Name | Default Value | Type | Description |
|---|---|---|---|
| name | not set | String | Block identifier like 'minecraft:chest' |
| states | not set | Keyed set of strings | Block state values to match |
| tags | not set | String | Block tags to match |
Place Strategy choices
| Value | Title | Description |
|---|---|---|
| any | Any | |
| with_matching | With matching | |
| with_matching_or_empty | With matching or empty |
Search Distance (Search Distance)
Search Distance Properties
JSON path: search_distance
| Name | Default Value | Type | Description |
|---|---|---|---|
| x | 0 | Decimal number | |
| y | 0 | Decimal number |
Search Strategy choices
| Value | Title | Description |
|---|---|---|
| nearest | Nearest | |
| random | Random |
Source Container Types
Same structure as Destination Container Types.
Source Container Types (Source Container Type)
Same structure as Destination Container Types (Destination Container Type).
Samples
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |