Skip to main content

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

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

Allows the mob to move back to the position they were spawned.

Entity Go Home Behavior Properties​

NameDefault ValueTypeDescription
calculate_new_path_radius2Decimal numberDistance in blocks that the mob is considered close enough to the end of the current path. A new path will then be calculated to continue toward home.
control_flags[]Control Flags choices
goal_radius0.5Decimal numberDistance 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.
interval120Integer numberA random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
on_failed[]Array of Failed itemsEvent(s) to run when this goal fails.
on_home[]Array of Home itemsEvent(s) to run when this mob gets home.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this AI Goal

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

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_failed

NameDefault ValueTypeDescription
eventString
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemFilters allow data objects to specify test criteria which allows their use.
filters (Alternate 1)not setObject
targetselfTarget 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_failed > 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.

Target choices​

ValueTitleDescription
babyBaby
blockBlock
damagerDamager
holderHolder
itemItem
otherOther
parentParent
playerPlayer
selfSelf
targetTarget

Samples​

minecraft:behavior.guardian_attack​

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

Allows this entity to use a laser beam attack. Can only be used by Guardians and Elder Guardians.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON for this behavior.

Entity Guardian Attack Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
elder_extra_magic_damage2Integer numberAmount of additional damage dealt from an elder guardian's magic attack. Value must be > 0.
hard_mode_extra_magic_damage2Integer numberIn hard difficulty, amount of additional damage dealt from a guardian's magic attack. Value must be > 0.
magic_damage1Integer numberAmount of damage dealt from a guardian's magic attack. Magic attack damage is added to the guardian's base attack damage. Value must be > 0.
min_distance3Decimal numberGuardian attack behavior stops if the target is closer than this distance (doesn't apply to elders).
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Elder Guardian: 4
sound_delay_time0.5Decimal numberTime (in seconds) to wait after starting an attack before playing the guardian attack sound. Value must be > 0.
x_max_rotation90Decimal numberMaximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target. Value must be > 0.
y_max_head_rotation90Decimal numberMaximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target. Value must be > 0.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Elder Guardian​
"minecraft:behavior.guardian_attack": {
"priority": 4
}

minecraft:behavior.harvest_farm_block​

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

Allows the entity to search within an area for farmland with air above it. If found, the entity will replace the air block by planting a seed item from its inventory on the farmland block. This goal will not execute if the entity does not have an item in its inventory.

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

  • Inventory (minecraft:inventory)
  • Navigation (minecraft:navigation)

Entity Harvest Farm Block Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
goal_radius1.5Decimal numberDistance in blocks within the entity considers it has reached it's target position. Value must be > 0.
max_seconds_before_search1Decimal numberThe maximum amount of time in seconds that the goal can take before searching for the first harvest block. The time is chosen between 0 and this number. Value must be > 0.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
search_cooldown_max_seconds8Decimal numberThe maximum amount of time in seconds that the goal can take before searching again, after failing to find a a harvest block already. The time is chosen between 0 and this number. Value must be > 0.
search_count0Integer numberThe 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_height1Integer numberThe height in blocks the entity will search within to find a valid target position. Value must be > 0.
search_range16Integer numberThe distance in blocks the entity will search within to find a valid target position. Value must be > 0.
seconds_until_new_task0.5Decimal numberThe amount of time in seconds that the goal will cooldown after a successful reap/sow, before it can start again. Value must be > 0.
speed_multiplier0.5Decimal numberMovement speed multiplier of the mob when using this goal.

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​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.hide​

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

Allows a mob with the hide component to attempt to move to - and hide at - an owned or nearby POI.

[!Note] Requires a point of interest to be set in order to work properly.

Entity Hide Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
duration1Decimal numberAmount of time in seconds that the mob reacts.
poi_typenullPoi Type choicesTells the goal what POI type it should be looking for
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this goal.
timeout_cooldown8Decimal numberThe cooldown time in seconds before the goal can be reused after a internal failure or timeout condition.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Poi Type choices​

ValueTitleDescription
bedBed
jobsiteJobsite
meeting_areaMeeting area

Samples​

minecraft:behavior.hold_ground​

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

Compels an entity to stop at their current location, turn to face a mob they are targeting, and react with an event.

[!Note] Requires a target in order to work properly. Entities can generate targets via one of the following behaviors:

  • Nearest Attackable Target Behavior (minecraft:behavior.nearest_attackable_target)
  • Hurt By Target Behavior (minecraft:behavior.hurt_by_target)

Entity Hold Ground Behavior Properties​

NameDefault ValueTypeDescription
broadcastfalseBoolean true/falseWhether to broadcast out the mob's target to other mobs of the same type.
broadcast_range0Decimal numberRange in blocks for how far to broadcast.
control_flags[]Control Flags choices
min_radius10Decimal numberMinimum distance the target must be for the mob to run this goal.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
within_radius_event{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Within Radius Event itemEvent to run when target is within the radius. This event is broadcasted if broadcast is true.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

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: within_radius_event

NameDefault ValueTypeDescription
eventString
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemFilters allow data objects to specify test criteria which allows their use.
filters (Alternate 1)not setObject
targetselfTarget 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: within_radius_event > 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.

Target choices​

ValueTitleDescription
babyBaby
blockBlock
damagerDamager
holderHolder
itemItem
otherOther
parentParent
playerPlayer
selfSelf
targetTarget

Samples​

minecraft:behavior.hover​

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

Allows the mob to hover in place.

Entity Hover Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
priority0Integer number

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

minecraft:behavior.hurt_by_target​

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

Allows the mob to target another mob that hurts them.

Entity Hurt By Target Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
alert_same_typefalseBoolean true/falseIf true, nearby mobs of the same type will be alerted about the damage
control_flags[]Control Flags choices
entity_types[]Array of Entity Types itemsList of entity types that this mob can target when hurt by themBogged: [{"filters":{"operator":"!=","test":"is_family","subject":"other","value":"breeze"}}], Breeze: [{"filters":{"all_of":[{"operator":"!=","test":"is_family","subject":"other","value":"skeleton"},{"operator":"!=","test":"is_family","subject":"other","value":"stray"},{"operator":"!=","test":"is_family","subject":"other","value":"zombie"},{"operator":"!=","test":"is_family","subject":"other","value":"husk"},{"operator":"!=","test":"is_family","subject":"other","value":"spider"},{"operator":"!=","test":"is_family","subject":"other","value":"cavespider"},{"operator":"!=","test":"is_family","subject":"other","value":"slime"}]}}]
entity_types (as Object)not setObject
hurt_ownerfalseBoolean true/falseIf true, the mob will hurt its owner and other mobs with the same owner as itself
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Entity Types​

List of entity types that this mob can target when hurt by them.

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​

Blaze​
"minecraft:behavior.hurt_by_target": {
"priority": 1
}
Bogged​
"minecraft:behavior.hurt_by_target": {
"entity_types": [
{
"filters": {
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "breeze"
}
}
],
"priority": 1
}
Breeze​
"minecraft:behavior.hurt_by_target": {
"entity_types": [
{
"filters": {
"all_of": [
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "skeleton"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "stray"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "zombie"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "husk"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "spider"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "cavespider"
},
{
"operator": "!=",
"test": "is_family",
"subject": "other",
"value": "slime"
}
]
}
}
],
"priority": 4
}

minecraft:behavior.inspect_bookshelf​

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

Allows the mob to inspect bookshelves.

Entity Inspect Bookshelf Behavior Properties​

NameDefault ValueTypeDescription
control_flags[]Control Flags choices
goal_radius0.5Decimal numberDistance 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.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
search_count10Integer numberThe 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_height1Integer numberThe height that the mob will search for bookshelves. Value must be > 0.
search_range0Integer numberThe distance in blocks the mob will look for books to inspect. Value must be > 0.
speed_multiplier1Decimal numberMovement speed multiplier of the mob when using this goal.

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​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

minecraft:behavior.investigate_suspicious_location​

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

Allows this entity to move towards a "suspicious" position based on data gathered in minecraft:suspect_tracking.

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

  • Suspect Tracking (minecraft:suspect_tracking)

Entity Investigate Suspicious Location Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
goal_radius1.5Decimal numberDistance in blocks within the entity considers it has reached it's target position.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Warden: 5
speed_multiplier1Decimal numberMovement speed multiplierWarden: 0.7

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Warden​
"minecraft:behavior.investigate_suspicious_location": {
"speed_multiplier": 0.7,
"priority": 5
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13