minecraft:behavior.look_at_entity

Allows the mob to look at nearby entities.

Properties

PropertyTypeDefaultWhat it does
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Filter to determine the conditions for this mob to look at the entity
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
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 Ravager uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:behavior.look_at_entity": {
    "priority": 10,
    "look_distance": 8,
    "angle_of_view_horizontal": 45,
    "filters": {
      "test": "is_family",
      "subject": "other",
      "value": "mob"
    }
  }
}

Used by 3

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

Related components