跳转至

Play

文档版本:1.21.0.24

Allows the mob to play with other baby villagers. This can only be used by Villagers.

架构

play:
{
  priority "priority"
  speed_multiplier "speed_multiplier"
  number "chance_to_start" : opt
  integer "follow_distance" : opt
  vector_of_3_items "friend_search_area"
  array "friend_types" : opt
  {
     "<any array element>" : opt
  }
  number "max_play_duration_seconds" : opt
  integer "random_pos_search_height" : opt
  integer "random_pos_search_range" : opt
}
prioritypriority
priority:
integer
speed_multiplierspeed_multiplier
speed_multiplier:
number
chance_to_startnumber
Percent chance that the mob will start this goal, from 0 to 1.
follow_distanceinteger
The distance (in blocks) that the mob tries to be in range of the friend it's following.
friend_search_areavector_of_3_items
The dimensions of the AABB used to search for a potential friend to play with.
vector_of_3_items:
array
{
  number "0..0" : opt
  number "1..1" : opt
  number "2..2" : opt
}
0..0number
The X component.
1..1number
The Y component.
2..2number
The Z component.
friend_typesarray
The entity type(s) to consider when searching for a potential friend to play with.
friend_types
<any array element>
max_play_duration_secondsnumber
The max amount of seconds that the mob will play for before exiting the Goal.
random_pos_search_heightinteger
The height (in blocks) that the mob will search within to find a random position position to move to. Must be at least 1.
random_pos_search_rangeinteger
The distance (in blocks) on ground that the mob will search within to find a random position to move to. Must be at least 1.