Skip to main content

Entity AI goal reference (16/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.float_wander​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_float_wander.md)

Allows the mob to float around like the Ghast.

Entity Float Wander Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
additional_collision_bufferfalseBoolean true/falseIf true, the mob will have an additional buffer zone around it to avoid collisions with blocks when picking a position to wander to.
allow_navigating_through_liquidsfalseBoolean true/falseIf true allows the mob to navigate through liquids on its way to the target position.
control_flags[]Control Flags choices
float_duration (Legacy FloatRange){"max":0,"min":0}Float Duration itemRange of time in seconds the mob will float around before landing and choosing to do something elseBat: [0.1,0.35]
float_duration (as Decimal number)not setDecimal number
float_wander_has_move_controltrueBoolean true/falseIf true, the MoveControl flag will be added to the behavior which means that it can no longer be active at the same time as other behaviors with MoveControl.
must_reachfalseBoolean true/falseIf true, the point has to be reachable to be a valid target
navigate_around_surfacefalseBoolean true/falseIf true, will prioritize finding random positions in the vicinity of surfaces, i.e. blocks that are not Air or Liquid.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
random_reselectfalseBoolean true/falseIf true, the mob will randomly pick a new point while moving to the previously selected oneBat: true
surface_xz_dist8Integer numberThe horizontal distance in blocks that the goal will check for a surface from a candidate position. Only valid when navigate_around_surface is true.
surface_y_dist8Integer numberThe vertical distance in blocks that the goal will check for a surface from a candidate position. Only valid when navigate_around_surface is true.
use_home_position_restrictiontrueBoolean true/falseIf true, the mob will respect home position restrictions when choosing new target positions. If false, it will choose target position without considering home restrictions
xz_dist10Integer numberDistance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1Bat: 10
y_dist7Integer numberDistance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1Bat: 7
y_offset0Decimal numberHeight in blocks to add to the selected target positionBat: -2

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: float_duration

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Bat​
"minecraft:behavior.float_wander": {
"float_duration": [
0.1,
0.35
],
"float_wander_has_move_control": false,
"random_reselect": true,
"y_offset": -2,
"use_home_position_restriction": false,
"xz_dist": 10,
"y_dist": 7
}

minecraft:behavior.follow_caravan​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_caravan.md)

Allows the mob to follow mobs that are in a caravan.

Entity Follow Caravan Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
entity_count1Integer numberNumber of entities that can be in the caravanLlama: 10
entity_types[]Entity Types itemList of entity types that this mob can follow in a caravan. Can be a single filter object or an array of filter objects.Llama: {"filters":{"test":"is_family","subject":"other","value":"llama"}}
entity_types (as Array of objects)not setArray of objects
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Llama: 3
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalLlama: 2.1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Entity Types​

List of entity types that this mob can follow in a caravan.

Entity Types Properties​

JSON path: entity_types

NameDefault ValueTypeDescription
cooldown0Decimal numberThe amount of time in seconds that the mob has to wait before selecting a target of the same type again
filtersnot setMinecraft filterConditions that make this entry in the list valid
max_dist16Decimal numberMaximum distance this mob can be away to be a valid choice
must_seefalseBoolean true/falseIf true, the mob has to be visible to be a valid choice
must_see_forget_duration3Decimal numberDetermines 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
reevaluate_descriptionfalseBoolean true/falseIf true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier1Decimal numberMultiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier1Decimal numberMultiplier for the walking speed. A value of 1.0 means the speed is unchanged

Samples​

Llama​
"minecraft:behavior.follow_caravan": {
"priority": 3,
"speed_multiplier": 2.1,
"entity_count": 10,
"entity_types": {
"filters": {
"test": "is_family",
"subject": "other",
"value": "llama"
}
}
}

minecraft:behavior.follow_mob​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_mob.md)

Allows the mob to follow other mobs.

Entity Follow Mob Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
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 itemIf non-empty, provides criteria for filtering which nearby Mobs can be followed.
filters (Alternate 1)not setObject
preferred_actor_typeStringThe type of actor to prefer following. If left unspecified, a random actor among those in range will be chosen.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Parrot: 4
search_range0Integer numberThe distance in blocks it will look for a mob to followParrot: 20
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalParrot: 1
stop_distance2Decimal numberThe distance in blocks this mob stops from the mob it is followingParrot: 3
use_home_position_restrictionfalseBoolean true/falseIf true, the mob will respect the 'minecraft:home' component's 'restriction_radius' field when choosing a target to follow.

filters​

If non-empty, provides criteria for filtering which nearby Mobs can be followed. If empty default criteria will be used, which will exclude Players, Squid variants, Fish variants, Tadpoles, Dolphins, and mobs of the same type as the owner of the Goal.

use_home_position_restriction​

If true, the mob will respect the 'minecraft:home' component's 'restriction_radius' field when choosing a target to follow. If false, it will choose target position without considering home restrictions.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Filters​

Filters Properties​

JSON path: filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Samples​

Parrot​
"minecraft:behavior.follow_mob": {
"priority": 4,
"search_range": 20,
"speed_multiplier": 1,
"stop_distance": 3
}

minecraft:behavior.follow_owner​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_owner.md)

Allows a mob to follow the player that owns it.

[!Note] Requires the entity to be marked as an owner through taming.

Entity Follow Owner Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
can_teleporttrueBoolean true/falseDefines if the mob will teleport to its owner when too far away.
control_flags[]Control Flags choices
ignore_vibrationfalseBoolean true/falseDefines if the mob should disregard following its owner after detecting a recent vibration.
max_distance60Decimal numberThe maximum distance the mob can be from its owner to start following it. Applicable only when "can_teleport" is set to false.
post_teleport_distance3Integer numberDefines how far (in blocks) the entity will be from its owner after teleporting. If not specified, it defaults to "stop_distance" + 1, allowing the entity to seamlessly resume navigation.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Allay: 6, Parrot: 3
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalAllay: 8, Parrot: 1
start_distance10Decimal numberThe minimum distance the mob must be from its owner to start following it.Allay: 16, Parrot: 5
stop_distance2Decimal numberThe distance at which the mob will stop following its owner.Allay: 4, Parrot: 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Allay​
"minecraft:behavior.follow_owner": {
"can_teleport": false,
"priority": 6,
"ignore_vibration": false,
"speed_multiplier": 8,
"start_distance": 16,
"stop_distance": 4
}
Parrot​
"minecraft:behavior.follow_owner": {
"priority": 3,
"speed_multiplier": 1,
"start_distance": 5,
"stop_distance": 1
}

minecraft:behavior.follow_parent​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_parent.md)

Allows the mob to follow their parent around.

[!Note] Requires the following component in order to work properly:

  • Is Baby (minecraft:is_baby) Requires the minecraft:is_baby component in order to have an adult mob tagged as a parent for the entity.

Entity Follow Parent Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Chicken: 5, Dolphin: 4, Goat: 6
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI GoalChicken: 1.1, Goat: 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Chicken​
"minecraft:behavior.follow_parent": {
"priority": 5,
"speed_multiplier": 1.1
}
Dolphin​
"minecraft:behavior.follow_parent": {
"priority": 4,
"speed_multiplier": 1.1
}
Goat​
"minecraft:behavior.follow_parent": {
"priority": 6,
"speed_multiplier": 1
}
Llama​
"minecraft:behavior.follow_parent": {
"priority": 5,
"speed_multiplier": 1
}
Pig​
"minecraft:behavior.follow_parent": {
"priority": 6,
"speed_multiplier": 1.1
}

minecraft:behavior.follow_target_captain​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_target_captain.md)

Allows mob to move towards its current target captain.

[!Note] Requires a entity to be labeled as a captain in a group. An example of this is the minecraft:is_illager_captain component used in the pillager.json entity definition.

[!Note] Refactored in format version 1.26.20 to the more general minecraft:behavior.follow_target_leader, which uses configurable leader_filters and search_cooldown instead of hard-coded captain logic. Existing content that uses follow_target_captain continues to load, but new content should prefer follow_target_leader.

[!Note] This item no longer works after format versions of at least 1.26.20.

Follow Target Captain Behavior Properties​

NameDefault ValueTypeDescription
follow_distance0Decimal numberDefines the distance in blocks the mob will stay from its target while following.
prioritynot setInteger numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
within_radius0Decimal numberDefines the maximum distance in blocks a mob can get from its target captain before giving up trying to follow it.

Samples​

minecraft:behavior.follow_target_leader​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityGoals/minecraftBehavior_follow_target_leader.md)

Allows mob to move towards its target leader.

[!Note] Added in 1.26.20 as the generalized replacement for minecraft:behavior.follow_target_captain. Use leader_filters (required) to define which entities qualify as leaders, search_cooldown (default 20 ticks) to throttle leader searches, and always_look_for_leader (default false) to keep searching even after a leader has been found.

[!Note] This item requires a format version of at least 1.26.20.

Entity Follow Target Leader Behavior Properties​

NameDefault ValueTypeDescription
always_look_for_leaderfalseBoolean true/falseIf true, the mob will always search for a valid leader to follow if none is found or current leader is not valid anymore
control_flags[]Control Flags choices
follow_distance0Decimal numberDefines the distance in blocks the mob will stay from its target while following.
leader_filters (Leader Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Leader Filters itemThe filters to use when determining if a mob is a suitable leader or not.
leader_filters (Alternate 1)not setObject
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
search_cooldown20Integer numberNumber of ticks that must pass before a new search is initiated after a target is not found, lost, or becomes invalid.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI Goal
within_radius0Decimal numberDefines the maximum distance in blocks a mob can get from its target leader before giving up trying to follow it.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Leader Filters​

Leader Filters Properties​

JSON path: leader_filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Samples​

Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13