HeadHitSound
ModMIT

HeadHitSound

This mod adds the system that makes headshot sound effects for melee attacks play.

242
Downloads
4
Followers
4 months ago
Updated
📦
6
Versions

📖About HeadHitSound

Important

⚠️this mod does not include a headshot sound.
You must add your own via a resource pack; otherwise, nothing will play.

How to add a sound via a resource pack

Adding sounds for headhitsound doesn’t require any major changes to vanilla Minecraft.
You only need to create a small namespace inside your resource pack.

Inside assets/, create a folder named headhitsound.
where is assets
Inside assets/headhitsound/, create a sounds.json file and a sounds folder.
where to place sounds.json and sounds folder
In sounds.json, you can adjust volume, pitch, and weights.
Here is a minimal example:

{
  "head.hit": {
    "sounds": [
      {
        "name": "headhitsound:head_hit1",
        "weight": 1,
#         "pitch": 1.0,
        "volume": 1.0
      }
    ]
  }
}

Place the corresponding .ogg file inside the sounds folder.
where to place ogg files
With the example above, that means placing head_hit1.ogg into assets/headhitsound/sounds/.

Once your resource pack is ready, don’t forget to enable it in-game.

If you don’t want to build one yourself, you can just download the sample pack from this and replace the .ogg files inside its sounds folder.

What does this mod do?

This lightweight mod defines a virtual head hitbox. When you land a melee hit on the head, your configured headshot sound plays.

It’s designed primarily for PvP practice.

It also works on zombies, slimes, villagers, and other mobs, though head positions may not be perfectly accurate.

Head definition

The “head” is the upper 23% of the hitbox. For very small mobs, it’s clamped to at least 0.15 m.

Projectiles like arrows or snowballs do not trigger it.

Dependencies

This mod requires Fabric api.