1. Wiki
  2. /实体
  3. /minecraft:home

minecraft:home

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:home。Get GodCraft

概览

minecraft:home 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 把实体的生成位置记为它的家,并可以防止它走得太远。

字段

字段类型默认值说明
restriction_typerestriction_type"none""none" 表示不限制,"random_movement" 让随机游荡保持在家附近,"all_movement" 让所有移动都保持在家附近。
restriction_radiusinteger0实体离家最远可以移动多少格。
home_block_liststring[]无算作有效家的方块;如果方块没了,限制就会解除。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:home": {
    "restriction_type": "none",
    "restriction_radius": 0,
    "home_block_list": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more