Mojira Archive
MC-138832

Pitch and volume are ignored in the new sound packet

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));
   }
}

 

 

Fixed

Fabien S.

2018-11-03, 07:54 PM

2022-01-05, 11:58 PM

2022-01-05, 11:58 PM

4

7

Community Consensus

(Unassigned)

sound

Minecraft 18w43c - 1.16.5Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 19w12a, 1.15.2, 1.16.5

21w18a