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

minecraft:environment_sensor

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

概览

minecraft:environment_sensor 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 当实体周围的条件成立时触发事件,比如处于水中或一天中的某个时间。可以用它根据环境切换行为。

字段

字段类型默认值说明
triggersList无要检查的过滤器与事件配对列表。

示例

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

BP/entities/<name>.json
{
  "minecraft:environment_sensor": {
    "triggers": {}
  }
}

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