Entity Documentation - minecraft:attack_cooldown
minecraft:attack_cooldown
adds a cooldown to an entity. The intention of the cooldown is to prevent the entity from attempting to acquire new attack targets.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
attack_cooldown_complete_event | not set | JSON Object | Event to be run when the cooldown is complete. |
attack_cooldown_time | [0.0, 1.0] | Range [a, b] | Amount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (min and max). |
Example
"minecraft:attack_cooldown":{
"attack_cooldown_complete_event": {
"event": "attack_cooldown_complete_event",
"target": "self"
},
"attack_cooldown_time": [0.1, 1.0]
}
Vanilla entities examples
hoglin
"attack_cooldown": {
"minecraft:attack_cooldown": {
"attack_cooldown_time": [ 10.0, 15.0 ],
"attack_cooldown_complete_event": {
"event": "attack_cooldown_complete_event",
"target": "self"
}
}
}
Vanilla entities using minecraft:attack_cooldown
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈