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

minecraft:heartbeat

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

概览

minecraft:heartbeat 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 按固定间隔重复播放心跳声,就像监守者一样。

字段

字段类型默认值说明
intervalMolang"1.00"给出两次心跳间隔秒数的 Molang 表达式;0 或更小会关闭心跳。
sound_eventString"heartbeat"每次心跳播放的声音。

示例

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

BP/entities/<name>.json
{
  "minecraft:heartbeat": {
    "interval": "1.00",
    "sound_event": "heartbeat"
  }
}

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