概览
minecraft:swing_sounds 是一个物品组件:写在自定义物品的 components 对象中。 替换玩家挥动这个物品击打东西时播放的声音。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
attack_miss | LevelSoundEvent | 无 | 挥空或没有造成伤害时的声音。 |
attack_hit | LevelSoundEvent | 无 | 普通命中时的声音。 |
attack_critical_hit | LevelSoundEvent | 无 | 暴击时的声音。 |
示例
写在 BP/items/<name>.json 的 components 对象中(值为默认值或占位值):
BP/items/<name>.json
{
"minecraft:swing_sounds": {
"attack_miss": {},
"attack_hit": {},
"attack_critical_hit": {}
}
}