mojira.dev
MC-36042

Sounds.json cannot alter the randomized pitch or volume at which the game calls certain sound events

The bug

The game calls all sound events with certain variables (most notible pitch, but also volume and whether it is global or not).

These variables cannot be changed by resource packs in any way shape or form, despite the sounds.json having corresponding fields (per sound file in a sound event).

Steps to reproduce

  1. Place grass blocks, listening closely to the pitch of the sounds.

  2. Run /playsound block.grass.place master @s ~ ~ ~ 1 several times, listening closely to the pitch of the sounds.

  3. Observe the pitch is different, and as such the game calls the sound event with a pitch (0.8 in this case).

Expected result

The game would always call sound events with "default" parameters, and the sounds.json would handle said parameters with the fields in the sounds list/array.

Actual result

The pitch, volume and whether or not a sound is global are hardcoded and cannot be edited by resource packs.

Suggested change for when this gets fixed

To preserve the game's functionality of a pitch range, without having to create an event every single pitch, it might be good to give the pitch and volume options a min and max value, rather than only a single float.

{"name":"mob/zombie/hurt1",pitch:{min:0.7,max:1.3}

Linked issues

Comments 21

Seems to have been improved for the "unfect" sound in 14w17a, but is still an issue.

Attempting to override a creeper's fuse noise with

"creeper_primed_nopitchchange": {"replace":true,"sounds": ["random/fuse_creeper"]},
"creeper.primed": {"replace":true,"category": "hostile","sounds": [{"type": "event","pitch":1.0,"name": "creeper_primed_nopitchchange"}]}

results in a sound that is ALWAYS incredibly slowed down, suggesting that the pitch for this sound is hardcoded to be slowed down.

Still an issue in 1.8.3.

A simpler way to put it is that pitch values are still hardcoded. Composed of:

  • Mob sounds have a slight random pitch change that cannot be changed

  • creeper.primed (the creeper's fuse sound) is hardcoded at a slows down the speed

  • mob.zombie.infect/mob.zombie.unfect applies a random pitch change that affects long sound files more, causing them to be incredibly distorted to the point where it's hard to understand

Simply put, these hardcoded pitch/speed changes need to be removed and ported to the vanilla sound system. Example, at pitch 1.0 the creeper fuse should sound exactly like the TNT fuse, and the sound should immediately stop right when it explodes.

If default wants it at a lower pitch/speed then that should be defined in sounds.json to do so. Max and min values would solve hardcoded pitch change, even if at worst, you had to specify min and max of 1.0 to fully disable pitch change.

Even with this: https://twitter.com/_grum/status/654011400256360448 bringing sound changes to 15w43a, pitche variation is still very hardcoded 😞

This will perhaps get looked at for 1.10, its a rather big change and I've not really found a nice way to handle it. It's the same for volume.

Postponed "for 1.10". Still an issue in 1.12.2. I've stopped working on my sound packs after discovering this.

11 more comments

Yours is not a bug, add "replace": true to the sound event, and its solved.

Affects snapshot 24w10a and release 1.20.4

Affects release 1.20.5

Requesting ownership if possible, due to the reporter being inactive and doesn't seem to be updating this report anymore.

insomniac_lemon

user-f2760

(Unassigned)

Confirmed

Platform

Low

Sound

hardcoded, mojang_internal_1, pitch, resource-pack, sound

Minecraft 13w42a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, ..., 1.20.2, 23w42a, 23w43b, 1.20.4, 24w10a

Retrieved