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));
}
}
Comments 9
Please check if anything has changed for 1.16.2(-rc1), I currently do not have access to anything I can use to check myself.
I just checked and it's still occurring when using 1.16.5 - parameters are still not being used.
Would really appreciate a fix for that!
Yep, this was resolved and can be closed.
@Override
public void playSound(@Nullable Player param0, Entity param1, SoundEvent param2, SoundSource param3, float param4, float var6) {
if (param0 == this.minecraft.player) {
this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(param2, param3, param4, var6, param1));
}
}
Please do not mark unreleased versions as affected.
You don't have access to them yet.