mojira.dev
MC-1538

Sound glitches when too many sounds are supposed to play

The bug

Minecraft can only handle playing 247 different sounds at the same time. It's possible to exceed this limit by having enough sounds played simultaneously, such as by placing numerous armour stands on top of a waterlogged conduit which is underneath lava. This could be fixed by increasing the sound limit to something like 65527, which would be infeasible to achieve in conventional gameplay.

The fix

Code analysis by @unknown can be found in this comment.

Linked issues

MC-1668 Some sounds disappear e.g. You can hear sheep and cows but no movement or block-hit-sound Resolved MC-10796 Bug with blazes sounds Resolved MC-11750 Chest sound glitched/messed up when near a mob sound. Resolved MC-15172 Block Sounds Resolved MC-16729 twinkle firework sound effect doesn't play when launching multiple fireworks Resolved

Attachments

Comments 89

Bug still exists in 1.4.4
It is an old glitch. One I wish would be fixed.

Can confirm.

It makes sense to me that the number of sounds played at a given time would have a cap, however if that's what's going on the priority seems screwed up, for as you pointed out, blaze ambience seems to win out over everything.

I would suggest the following priorities:
1. Player Damage
2. Mob Death/damage
3. block change (pistons, buttons)
4. Hostile Mob ambience
5. Passive mob ambience
6. Constant sounds (water, lava, fire [including blaze burning noise], rain)

obviously I have missed some sounds (minecarts, explosions, drops) but I think you get the point

I don't know how involved it is to code but I always wondered why entity to sound relationship within a time slice is 1-to-1? Within certain radius, new sound from an entity/block should not be generated/processed/emitted if the same type of (other) entity has the sound still playing. At the very least, to preserve ambiance, this should be capped at 3 and no more. Playing tens or hundreds of cows mooing in a pen makes neither any sense nor actually sounds any good with sound bytes eventually cutting each other out, not to mention causing way too many issues to be anywhere near worth it.

What really should happen is the game needs to detect how many of a particular sound source is within earshot of the player and if it is over X number of units, it should transition to a single sound file representing the entire multitude. For instance, if I have a certain number of chickens nearby, it will play "smallchickengroup.wav", or "mediumchickengroup.wav" or similar, rather than trying to call individual chicken noises for each chicken. This would be less resource intensive and it would be much more pleasant overall by avoiding phasing, chorusing, and overlap in the sfx.

To add a little bit of sophistication to the mix, the game might also try and still call individual chicken noises for any in your direct line of sight, even if within a larger group, as this would mimic how our brains actually filter sounds.

79 more comments

Can confirm in 23w04a

Can confirm in 23w05a

Can confirm in 23w32a

Can confirm in 24w13a.

Can confirm in 1.20.5.

andychay2

CallMeChris

(Unassigned)

Confirmed

Platform

Normal

Sound

sounds

Minecraft 1.4.2, Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, ..., 1.21, 1.21.1, 24w33a, 24w34a, 24w36a

Retrieved