Fixed heartbeat sound effect not playing

This commit is contained in:
Sollace 2022-10-08 17:12:36 +02:00
parent 320f78a1b8
commit a068b5cc03

View file

@ -277,7 +277,7 @@ public class UHud extends DrawableHelper {
if (exhaustion > 0.5F && (heartbeatSound == null || heartbeatSound.isDone())) {
client.getSoundManager().play(
heartbeatSound = new LoopingSoundInstance<>(client.player, player -> {
return partySound != null && Pony.of(player).getMagicalReserves().getExhaustion().getPercentFill() > 0.5F;
return partySound == null && Pony.of(player).getMagicalReserves().getExhaustion().getPercentFill() > 0.5F;
}, USounds.ENTITY_PLAYER_HEARTBEAT, 1, 1, client.world.random)
);
}