Fixed sounds not playing when dashing

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

View file

@ -531,7 +531,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
} }
private void playSound(SoundEvent sound, float volume, float pitch) { 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) { private void tickNaturalFlight(MutableVector velocity) {