Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-46634

Thunder volume not affected by weather volume settings

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Minecraft 14w26a
    • Minecraft 1.7.4, (57)
      Minecraft 14w05a, Minecraft 14w06a, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 1.9, Minecraft 1.10.2, Minecraft 16w39c, Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14, Minecraft 1.14.3, 1.14.4, 19w37a, 1.15.1, 1.15.2, 20w12a, 1.16, 1.16.1, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4, 21w05a, 1.17, 1.17.1, 1.18, 1.19, 1.19.2, 23w45a, 1.20.6, 1.21.3
    • Confirmed
    • Sound
    • Low
    • Platform

      The bug

      During a thunderstorm, the volume level of the thunder was drowning out other noises (like the music I play in the background), so I opened the volume controls to adjust it down to a tolerable level.

      Adjusting weather volume to OFF is the only way to make it change volume. Adjusting weather volume from 0% to 100% had no noticeable effect on the volume of the thunder.

      Code Analysis

      Code analysis by Oval can be found in this comment

          [MC-46634] Thunder volume not affected by weather volume settings

          Besides the suggested fix by oval, it's also possible to provide a VERY TINY volume in the sounds.json; I'm talking 0.0001; this should still allow the sound to be played literally everywhere, but be completely responsive to the sound slider, even having 99% affect the volume. The one downside is that /playsound would then need to provide such a high volume (10000) as well in order to make it heard. (This is a little trick I use with custom music so it plays everywhere but isn't making sliders unresponsive.)

          user-f2760 (Inactive) added a comment - Besides the suggested fix by oval, it's also possible to provide a VERY TINY volume in the sounds.json; I'm talking 0.0001; this should still allow the sound to be played literally everywhere, but be completely responsive to the sound slider, even having 99% affect the volume. The one downside is that /playsound would then need to provide such a high volume (10000) as well in order to make it heard. (This is a little trick I use with custom music so it plays everywhere but isn't making sliders unresponsive.)

          Can confirm in 1.17.1.

          [Mod] ampolive added a comment - Can confirm in 1.17.1.

          Kieran added a comment -

          Can confirm still present on 1.16.4 - went searching to see which category it was in as the lightning was so much louder than the rest of the game and found this. Turned Weather and Ambient/Environment to OFF and still heard the thunder, so thought I was bad at guessing which audio category it's in.

          Kieran added a comment - Can confirm still present on 1.16.4 - went searching to see which category it was in as the lightning was so much louder than the rest of the game and found this. Turned Weather and Ambient/Environment to OFF and still heard the thunder, so thought I was bad at guessing which audio category it's in.

          Numeritos added a comment -

          Affects 1.16-rc1

          Numeritos added a comment - Affects 1.16-rc1

          Oval added a comment -

          FaRo1, oh, I didn't know that. The intent is to let the sound travel as far as possible with lightning, but then you get bugs like these. But 10000 as volume for lightning strike seems overkill as the dragon flapping is just 5f, which also needs to be heard from a far.

          Oval added a comment - FaRo1 , oh, I didn't know that. The intent is to let the sound travel as far as possible with lightning, but then you get bugs like these. But 10000 as volume for lightning strike seems overkill as the dragon flapping is just 5f, which also needs to be heard from a far.

          If you set the audio "volume" parameter of "/playsound" higher than a certain value, it becomes related to spatial "volume" in a way. Maybe this was how it was intended here as well?

          Reference: https://gaming.stackexchange.com/a/352304/171580 (Yes, I'm quoting myself.)

          Fabian Röling added a comment - If you set the audio "volume" parameter of "/playsound" higher than a certain value, it becomes related to spatial "volume" in a way. Maybe this was how it was intended here as well? Reference: https://gaming.stackexchange.com/a/352304/171580 (Yes, I'm quoting myself.)

          Oval added a comment -

          The following is based on yarn 1.15.1 names.

          In the method net.minecraft.entity.LightningEntity.tick() where the ENTITY_LIGHTNING_BOLT_THUNDER sound hook is, the volume is set to 10000.0f, which if you set your volume to 1%, results in 100f but from my observations (using 1.12.2 MCP), you only notice change in sound if the assigned volume to the playSound hook is less than 30f.

          My suggestion is to lower it to 5f. That's the same volume as the ender dragon wings flapping (which quite loud too) and will lower the volume, of course.

          Example
          this.world.playSound(null, this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 5f, 0.8f + this.random.nextFloat() * 0.2f);
          

          Oval added a comment - The following is based on yarn 1.15.1 names. In the method net.minecraft.entity.LightningEntity.tick() where the ENTITY_LIGHTNING_BOLT_THUNDER sound hook is, the volume is set to 10000.0f , which if you set your volume to 1%, results in 100f but from my observations (using 1.12.2 MCP), you only notice change in sound if the assigned volume to the playSound hook is less than 30f . My suggestion is to lower it to 5f . That's the same volume as the ender dragon wings flapping (which quite loud too) and will lower the volume, of course. Example this .world.playSound( null , this .getX(), this .getY(), this .getZ(), SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 5f, 0.8f + this .random.nextFloat() * 0.2f);

          Taylor added a comment - - edited

          Still an issue as of 1.14.3.
          I am absolutely flabbergasted that this bug has gone unaddressed for five years

          Taylor added a comment - - edited Still an issue as of 1.14.3. I am absolutely flabbergasted that this bug has gone unaddressed for five years . 

          Brian Ronald added a comment -

          Still an issue in 1.14

          Brian Ronald added a comment - Still an issue in 1.14

          Josh Johnson added a comment -

          Re-confirmed as a problem in 19w12b.

          Josh Johnson added a comment - Re-confirmed as a problem in 19w12b.

            Unassigned Unassigned
            Asteraoth [Mod] Asteraoth
            Votes:
            60 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              CHK: