概览
minecraft:celebrate_hunt 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让生物在击杀目标后庆祝,就像猪灵狩猎后跳舞一样。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
broadcast | Boolean | "true" | 为 true 时,附近的实体也会一起庆祝。 |
celeberation_targets | Minecraft Filter | 无 | 被击杀的目标必须满足的条件,才会开始庆祝。 |
celebrate_sound | String | 无 | 庆祝时播放的声音。 |
duration | Integer | "4" | 庆祝持续多少秒。 |
radius | Decimal | "16" | 广播时通知其他实体一起庆祝的距离(以方块计)。 |
sound_interval | Range [a, b] | "0" | 两次庆祝声音之间的随机等待秒数。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:celebrate_hunt": {
"broadcast": "true",
"celeberation_targets": {},
"celebrate_sound": "",
"duration": "4",
"radius": "16",
"sound_interval": "0"
}
}