minecraft:swing_sounds for you with a switch.Get GodCraftOverview
minecraft:swing_sounds is an item component: it goes in the components object of a custom item. Replaces the sounds played when the player swings this item at something.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
attack_miss | LevelSoundEvent | none | Sound for a swing that hits nothing or does no damage. |
attack_hit | LevelSoundEvent | none | Sound for a normal hit. |
attack_critical_hit | LevelSoundEvent | none | Sound for a critical hit. |
Example
Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):
BP/items/<name>.json
{
"minecraft:swing_sounds": {
"attack_miss": {},
"attack_hit": {},
"attack_critical_hit": {}
}
}