跳转至

Home

文档版本:1.21.50.25

Saves a home pos for when the the entity is spawned.

架构

home:
{
  integer "restriction_radius" : opt
  array "home_block_list" : opt
  {
    identifier "<any array element>"
  }
  string "restriction_type" : opt
}
restriction_radiusinteger
The radius that the entity will be restricted to in relation to its home.
home_block_listarray
Optional block list that the home position will be associated with. If any of the blocks no longer exist at that position, the home restriction is removed. Example syntax: minecraft:sand. Not supported: minecraft:sand:1
home_block_list
<any array element>identifier
Optional block that the home position will be associated with. If any of the blocks no longer exist at that position, the home restriction is removed. Example syntax: minecraft:sand. Not supported: minecraft:sand:1
identifier:
string
restriction_typestring
Defines how the the entity will be restricted to its home position. The possible values are:
'none', which poses no restriction.
'random_movement', which restricts randomized movement to be around the home position.
[Beta] 'all_movement', which restricts any kind of movement to be around the home position. However, entities that somehow got too far away from their home will always be able to move closer to it, if prompted to do so.