手冊:minecraft:attack_cooldown

出自Minecraft基岩版开发Wiki
資料驅動 實體 > minecraft:attack_cooldown
minecraft:attack_cooldown
附加包元件
元件所屬
元件型別
元件ID
-1439360398
加入版本
?

設定實體的攻擊CD。

模式[編輯]

attack_cooldown:
object "attack_cooldown_complete_event": opt
{
  string "event": opt
  string "target": opt
}
array "attack_cooldown_time": opt

結構[編輯]

  •  minecraft:attack_cooldown:根物件。
    •  attack_cooldown_complete_event:設定攻擊CD完成時觸發事件。
      •  event:觸發的事件名稱
      •  target:目標,預設self
    •  attack_cooldown_time:設定CD時長,預設[0.0, 1.0]。

範例[編輯]

字串型
"minecraft:attack_cooldown":{
 "attack_cooldown_complete_event": {
        "event": "attack_cooldown_complete_event",
        "target": "self"
    },
    "attack_cooldown_time": [0.1, 1.0]
}