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

Sound volume is clamped between 0 and 1 too late

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.2
    • None
    • Confirmed
    • Sound

      When you use a /playsound command to play a sound at above 1 volume, it increases the range in which it can be heard; the sound volume itself gets clamped between 0 and 1, so it never plays louder than the actual audio file. However, the multiplication of the sound sliders happens before clamping, rather than after, making them useless with high-volume /playsound commands.

      Steps to reproduce:

      1. Turn the hostile mobs slider to 1%
      2. /playsound entity.zombie.ambient hostile @s
      3. Note how silent it sounds
      4. /playsound entity.zombie.ambient hostile @s ~ ~ ~ 1000
      5. Note how loud it is

      Expected behavior:
      The volume would be low due to low % setting.

      Actual behavior:
      It's just as loud as 100%.

      To fix this, all that needs to be done is moving the clamping to before the slider value multiplication.

      Fixing this fixes MC-46634 as well as the responsiveness for the ender dragon's wings flapping sound.

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: