Ouch!
A menu to select your hurt sound effects
Quick challenge
How far can you run before the mobs catch you?
Minecraft check
Confirm your run
Complete the quick check to get your code.
Ouch!
Info
This datapack allows players to choose a preset of sounds to play when they're hit, or die. It also provides an easy way to add your own sound presets, in addition to the default ones.
This pack does not disable the vanilla hit sound, it simply plays another sound in addition to it. You can use a resource pack to remove, or decrease the sound of, the vanilla hit sound.
Default sound presets:
- None - Wolf - Cat - Villager - Allay - Bee - Dog - Zombie - Pillager - Piglin - Enderman - Creaking - Metal - Glass - Air
Note: unfortunately, you cannot change what subtitles are shown without using a resource pack to add custom sound effects. This means you may see inaccurate subtitles when using the pack.
Adding your own sound presets
Sound presets are defined by functions in the `hitsoundpicker:preset_registries` tag. By default, the only such function is `hitsoundpicker:register_default`. To add your own presets, you can create your own functions and add them to `hitsoundpicker:preset_registries`, or you can directly add the presets to `hitsoundpicker:register_default`.
Inside a function, sound presets are defined by either calling `hitsoundpicker:api/register_preset` or `hitsoundpicker:api/register_preset_pitched`. Below are examples of calls to both.
`register_preset`:
``` function hitsoundpicker:api/register_preset { "display": "Silverfish", "sound": "minecraft:entity.silverfish.hurt", "death_sound": "minecraft:entity.silverfish.death" } ```
`register_preset_pitched`:
``` function hitsoundpicker:api/register_preset_pitched { "display": "Wool", "sound": "minecraft:block.wool.break", "sound_pitch": 1.0, "death_sound": "minecraft:block.wool.break", "death_sound_pitch": 0.5 } ``` The arguments `display`, `sound`, and `death_sound` are the same across both functions: - `display` is what the preset will display as in the selection menu - `sound` is the sound that will play when the player takes regular damage - `death_sound` is the sound that will play when the player dies
The arguments `sound_pitch` and `death_sound_pitch` are present only in `register_preset_pitched`: - `sound_pitch` is the speed at which `sound` will play - `death_sound_pitch` is the speed at which `death_sound` will play
`register_preset` is a shorthand for calling `register_preset_pitched` with `sound_pitch` and `death_sound_pitch` both set to 1.0
Sound presets will show up in the menu in the order that the function calls to register them were made.
Non-vanilla sounds will also work with the datapack, assuming that everyone has the necessary resource pack or mod to provide the sounds.
Other
Contact me on discord @parax342 with bugs or suggestions
Thanks to the Minecraft Commands discord for helping with this project