minecraft:behavior.look_at_player

Allows the mob to look at the player when the player is nearby.

Properties

PropertyTypeDefaultWhat it does
angle_of_view_verticalInteger0 to 360360The angle in degrees that the mob can see rotated on the X-axis (up-down).
angle_of_view_horizontalInteger0 to 360360The angle in degrees that the mob can see rotated on the Y-axis (left-right).
look_timeObject{"max": 4, "min": 2}Time range to look at the nearest entity.
minDecimal0
maxDecimal0
look_distanceDecimalmin 08The distance in blocks from which the entity will look at the nearest entity.
probabilityDecimal0 to 10.02The probability of looking at the target. A value of 1.00 is 100%.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

This is how vanilla Zombie Horse uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.look_at_player": {
    "priority": 7,
    "look_distance": 6.0,
    "probability": 0.02,
    "look_time": {
      "min": 2.0,
      "max": 4.0
    }
  }
}

Used by 69

Vanilla entities with minecraft:behavior.look_at_player in their definition:

Related components