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

Pitch and volume are ignored in the new sound packet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 21w18a
    • Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 19w12a, 1.15.2, 1.16.5
    • Community Consensus
    • (Unassigned)

      The volume and the pitch seem to be ignored in the new packet (https://wiki.vg/Pre-release_protocol#Entity_Sound_Effect) used to play a sound at an entity.


      After some simple investigation, it seems like the bug should be easily fixed.

      The names are from http://export.mcpbot.bspk.rs/

       

      If we look at the following method, we can see that there is two parameters not being used (volume and pitch, indeed) while there is a constructor for EntityTickableSound that take them

       

      net.minecraft.client.world.ClientWorld (the method called in the packet handler of "SSpawnMovingSoundEffectPacket")

      public void playMovingSound(@Nullable PlayerEntity playerIn, Entity entityIn, SoundEvent eventIn, SoundCategory categoryIn, float volume, float pitch) {
         if (playerIn == this.mc.player) {
            this.mc.getSoundHandler().play(new EntityTickableSound(eventIn, categoryIn, entityIn));
         }
      }
      

       

       

            Unassigned Unassigned
            TheWhoosher Fabien S.
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: