Ouch! 图标

Ouch!

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/ouch!
资源信息

Minecraft 版本: 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2

平台: datapack

标签: utility

资源介绍

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

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Braydo's Screenshot Menu

价格:0 墨喵币
下载量:0

查看详情
GiveawayRS

价格:0 墨喵币
下载量:0

查看详情
Truly Enchanting

价格:0 墨喵币
下载量:0

查看详情
Dark Enchanting [NeoForge/Fabric]

价格:0 墨喵币
下载量:0

查看详情