1. Wiki
  2. /Items
  3. /minecraft:swing_sounds

minecraft:swing_sounds

Don't want to write this by hand? GodCraft sets minecraft:swing_sounds for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
attack_missLevelSoundEventnoneSound for a swing that hits nothing or does no damage.
attack_hitLevelSoundEventnoneSound for a normal hit.
attack_critical_hitLevelSoundEventnoneSound 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": {}
  }
}

Items: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more