minecraft:behavior.look_at_target
Allows the mob to look at the entity they are targeting.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
angle_of_view_vertical | Integer0 to 360 | 360 | The angle in degrees that the mob can see rotated on the X-axis (up-down). |
angle_of_view_horizontal | Integer0 to 360 | 360 | The angle in degrees that the mob can see rotated on the Y-axis (left-right). |
look_time | Object | {"max": 4, "min": 2} | Time range to look at the nearest entity. |
min | Decimal | 0 | |
max | Decimal | 0 | |
look_distance | Decimalmin 0 | 8 | The distance in blocks from which the entity will look at the nearest entity. |
probability | Decimal0 to 1 | 0.02 | The probability of looking at the target. A value of 1.00 is 100%. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Wither uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.look_at_target": {
"look_time": {
"min": 1,
"max": 2
},
"priority": 5
}
}Used by 1
Vanilla entities with minecraft:behavior.look_at_target in their definition:
Related components
behavior.hurt_by_targetbehavior.follow_target_captainbehavior.defend_trusted_targetbehavior.defend_village_targetbehavior.jump_around_targetbehavior.move_around_targetbehavior.move_towards_targetbehavior.owner_hurt_by_targetbehavior.owner_hurt_targetbehavior.stalk_and_pounce_on_targetbehavior.target_when_pushedbehavior.wither_target_highest_damagebehavior.follow_target_leaderbehavior.vex_copy_owner_target