Fixed sounds not playing when dashing

This commit is contained in:
Sollace 2024-09-16 17:53:02 +01:00
parent 0ba3fd64a7
commit 6f9af46060
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -530,7 +530,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
}
private void playSound(SoundEvent sound, float volume, float pitch) {
entity.getWorld().playSoundFromEntity(entity, entity, sound, SoundCategory.PLAYERS, volume, pitch);
entity.getWorld().playSoundFromEntity(entity.getWorld().isClient ? entity : null, entity, sound, SoundCategory.PLAYERS, volume, pitch);
}
private void tickNaturalFlight(MutableVector velocity) {