跳转至

Sniff

文档版本:1.21.0.24

Sniff compels this entity to detect the nearest player within "sniffing_radius" and update its minecraft:suspect_tracking component state.

架构

sniff:
{
  priority "priority"
  vector_of_2_items "cooldown_range"
  number "duration" : opt
  number "sniffing_radius" : opt
  number "suspicion_radius_horizontal" : opt
  number "suspicion_radius_vertical" : opt
}
prioritypriority
priority:
integer
cooldown_rangevector_of_2_items
Cooldown range between sniffs in seconds.
vector_of_2_items:
array
{
  number "0..0" : opt
  number "1..1" : opt
}
0..0number
The X component.
1..1number
The Y component.
durationnumber
Sniffing duration in seconds
sniffing_radiusnumber
Mob detection radius.
suspicion_radius_horizontalnumber
Mob suspicion horizontal radius. When a player is within this radius horizontally, the anger level towards that player is increased.
suspicion_radius_verticalnumber
Mob suspicion vertical radius. When a player is within this radius vertically, the anger level towards that player is increased.