Skip to main content

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

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

Allows monsters to jump at and attack their target. Can only be used by hostile mobs.

[!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 Leap At Target Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
control_flags[]Control Flags choices
must_be_on_groundtrueBoolean true/falseIf true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Cave Spider: 4
set_persistentfalseBoolean true/falseAllows the actor to be set to persist upon targeting a player
yd0Decimal numberThe height in blocks the mob jumps when leaping at its targetCave Spider: 0.4

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

Cave Spider​

At /minecraft:entity/component_groups/minecraft:spider_angry/minecraft:behavior.leap_at_target/:

"minecraft:behavior.leap_at_target": {
"must_be_on_ground": false,
"priority": 4,
"yd": 0.4
}

minecraft:behavior.look_at_entity​

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

Compels an entity to look at a specific entity by rotating the head bone pose within a set limit.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON. The min_look_time and max_look_time fields are deprecated and replaced by a single look_time range (with min and max). Existing uses of min_look_time / max_look_time are upgraded automatically.

Entity Look At Entity Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
angle_of_view_horizontal360Integer numberThe angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360.Ravager: 45
angle_of_view_vertical360Integer numberThe angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360.
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 itemFilter to determine the conditions for this mob to look at the entityEvocation Illager: {"test":"is_family","subject":"other","value":"mob"}
filters (Alternate 1)not setObject
look_distance8Decimal numberThe distance in blocks from which the entity will look at the nearest entity.Evocation Illager: 8, Vex: 6
look_time{"max":4,"min":2}Look Time itemTime range to look at the nearest entity.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Evocation Illager: 10, Vex: 9
probability0.019999999552965164Decimal numberThe probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1.Vex: 0.02

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.

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: look_time

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Vex​
"minecraft:behavior.look_at_entity": {
"priority": 9,
"look_distance": 6,
"probability": 0.02,
"filters": {
"test": "is_family",
"subject": "other",
"value": "mob"
}
}
Evocation Illager​
"minecraft:behavior.look_at_entity": {
"priority": 10,
"look_distance": 8,
"filters": {
"test": "is_family",
"subject": "other",
"value": "mob"
}
}
Ravager​
"minecraft:behavior.look_at_entity": {
"priority": 10,
"look_distance": 8,
"angle_of_view_horizontal": 45,
"filters": {
"test": "is_family",
"subject": "other",
"value": "mob"
}
}

minecraft:behavior.look_at_player​

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

Compels an entity to look at the player by rotating the head bone pose within a set limit.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON. The min_look_time and max_look_time fields are deprecated and replaced by a single look_time range (with min and max). Existing uses of min_look_time / max_look_time are upgraded automatically.

Entity Look At Player Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
angle_of_view_horizontal360Integer numberThe angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360.Ravager: 45
angle_of_view_vertical360Integer numberThe angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360.
control_flags[]Control Flags choices
look_distance8Decimal numberThe distance in blocks from which the entity will look at the nearest entity.Bogged: 8, Breeze: 16, Cave Spider: 6
look_time{"max":4,"min":2}Look Time itemTime range to look at the nearest entity.Zombie Horse: [2,4], Campghost: [0,100]
max_look_timenot setDecimal numberArmadillo: 80
min_look_timenot setDecimal numberArmadillo: 40
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Allay: 8, Armadillo: 7, Axolotl: 10
probability0.019999999552965164Decimal numberThe probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1.Allay: 0.02, Elder Guardian: 0.01, Enderman: 8
target_distancenot setDecimal numberAllay: 6

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: look_time

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Allay​
"minecraft:behavior.look_at_player": {
"priority": 8,
"target_distance": 6,
"probability": 0.02
}
Bogged​
"minecraft:behavior.look_at_player": {
"priority": 7,
"look_distance": 8
}
Breeze​
"minecraft:behavior.look_at_player": {
"priority": 7,
"look_distance": 16
}
Cave Spider​
"minecraft:behavior.look_at_player": {
"priority": 7,
"look_distance": 6,
"probability": 0.02
}
Armadillo​
"minecraft:behavior.look_at_player": {
"priority": 7,
"target_distance": 6,
"probability": 0.02,
"min_look_time": 40,
"max_look_time": 80
}
Axolotl​
"minecraft:behavior.look_at_player": {
"priority": 10,
"target_distance": 6,
"probability": 0.02
}
Camel​
"minecraft:behavior.look_at_player": {
"priority": 7,
"target_distance": 6,
"probability": 0.02
}
Cat​
"minecraft:behavior.look_at_player": {
"priority": 9
}
Copper Golem​
"minecraft:behavior.look_at_player": {
"priority": 6,
"look_distance": 6,
"probability": 0.02
}
Creeper​
"minecraft:behavior.look_at_player": {
"priority": 6,
"look_distance": 8
}
Dolphin​
"minecraft:behavior.look_at_player": {
"priority": 8,
"look_distance": 6
}
Drowned​
"minecraft:behavior.look_at_player": {
"priority": 8,
"look_distance": 6,
"probability": 0.02
}

minecraft:behavior.look_at_target​

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

Compels an entity to look at the target by rotating the head bone pose within a set limit.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON. The min_look_time and max_look_time fields are deprecated and replaced by a single look_time range (with min and max). Existing uses of min_look_time / max_look_time are upgraded automatically.

[!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 Look At Target Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
angle_of_view_horizontal360Integer numberThe angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360.
angle_of_view_vertical360Integer numberThe angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360.
control_flags[]Control Flags choices
look_distance8Decimal numberThe distance in blocks from which the entity will look at the nearest entity.Axe Turret: 12, Bow Turret: 19, Crossbow Turret: 15
look_time{"max":4,"min":2}Look Time itemTime range to look at the nearest entity.Axe Turret: [1,5]
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Wither: 5, Axe Turret: 2, Bow Turret: 1
probability0.019999999552965164Decimal numberThe probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1.Axe Turret: 1

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: look_time

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Wither​
"minecraft:behavior.look_at_target": {
"priority": 5
}
Axe Turret​
"minecraft:behavior.look_at_target": {
"priority": 2,
"look_distance": 12,
"probability": 1,
"look_time": [
1,
5
]
}
Bow Turret​
"minecraft:behavior.look_at_target": {
"priority": 1,
"look_distance": 19,
"probability": 1,
"look_time": [
1,
5
]
}
Crossbow Turret​
"minecraft:behavior.look_at_target": {
"priority": 1,
"look_distance": 15,
"probability": 1,
"look_time": [
1,
5
]
}
Shbullet Turret​
"minecraft:behavior.look_at_target": {
"priority": 1,
"look_distance": 12,
"probability": 1,
"look_time": [
1,
5
]
}

minecraft:behavior.look_at_trading_player​

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

Compels an entity to look at the player that is currently trading with the entity.

[!Note] Requires the ability to trade in order to work properly.

[!Note] In 1.26.0 the schema is stricter and rejects invalid JSON. The min_look_time and max_look_time fields are deprecated and replaced by a single look_time range (with min and max). Existing uses of min_look_time / max_look_time are upgraded automatically.

Entity Look At Trading Player Behavior Properties​

NameDefault ValueTypeDescriptionExample Values
angle_of_view_horizontal360Integer numberThe angle in degrees that the mob can see rotated on the Y-axis (left-right). Value must be <= 360.
angle_of_view_vertical360Integer numberThe angle in degrees that the mob can see rotated on the X-axis (up-down). Value must be <= 360.
control_flags[]Control Flags choices
look_distance8Decimal numberThe distance in blocks from which the entity will look at the nearest entity.
look_time{"max":4,"min":2}Look Time itemTime range to look at the nearest entity.
priority0Integer numberAs priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.Villager: 2, Villager v2: 7, Wandering Trader: 4
probability0.019999999552965164Decimal numberThe probability of looking at the target. A value of 1.00 is 100%. Value must be <= 1.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: look_time

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Samples​

Villager​
"minecraft:behavior.look_at_trading_player": {
"priority": 2
}
Villager v2​
"minecraft:behavior.look_at_trading_player": {
"priority": 7
}
Wandering Trader​
"minecraft:behavior.look_at_trading_player": {
"priority": 4
}

minecraft:behavior.make_love​

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

Allows the villager to look for a mate to spawn other villagers with.

[!Note] Can only be used on the following type of entity:

  • Villager (minecraft:villager)

Entity Make Love Behavior Properties​

NameDefault ValueTypeDescription
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.

Control Flags choices​

ValueTitleDescription
jumpJump
lookLook
moveMove

Samples​

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