跳转至

Look At Player

文档版本:1.21.0.24

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

架构

look_at_player:
{
  priority "priority"
  integer "angle_of_view_vertical" : opt
  integer "angle_of_view_horizontal" : opt
  number "look_distance" : opt
  number "probability" : opt
  array "look_time" : opt
  {
    number "0..0" : opt
    number "1..1" : opt
  }
  number "target_distance" : opt
}
prioritypriority
priority:
integer
angle_of_view_verticalinteger
The angle in degrees that the mob can see in the X-axis (left-right).
angle_of_view_horizontalinteger
The angle in degrees that the mob can see in the Y-axis (up-down).
look_distancenumber
The distance in blocks from which the entity will look at.
probabilitynumber
The probability of looking at the target. A value of 1.00 is 100%
look_timearray
Time range to look at the entity.
look_time
0..0number
The minimum amount of time to look.
1..1number
The maximum amount of time to look.
target_distancenumber
The distance in blocks from which the entity will choose a target.