From daedfe9eb54d44854385dca1f59a4bc25f3b7e47 Mon Sep 17 00:00:00 2001 From: doctor4t <25477005+doctor4t@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:00:46 +0100 Subject: [PATCH] Fix #81 --- CHANGELOG.md | 1 + .../effective/client/world/WaterfallCloudGenerators.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a6ffe12..fc283cfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Ravagers roaring after being stunned - The Ender Dragon's long roar when perched - Added four new config options to disable each screen shake trigger individually +- Removed the need for waterfalls to be visible by the player in order to play sound - Added Ukrainian translation, thanks to ttrafford7 and V972! - Added Portuguese (Brazil) translation, thanks to FITFC! diff --git a/src/main/java/ladysnake/effective/client/world/WaterfallCloudGenerators.java b/src/main/java/ladysnake/effective/client/world/WaterfallCloudGenerators.java index e0572283..c2622ede 100644 --- a/src/main/java/ladysnake/effective/client/world/WaterfallCloudGenerators.java +++ b/src/main/java/ladysnake/effective/client/world/WaterfallCloudGenerators.java @@ -65,7 +65,7 @@ public static void tick() { if (distance > EffectiveConfig.cascadeSoundDistanceBlocks || EffectiveConfig.cascadeSoundsVolumeMultiplier == 0 || EffectiveConfig.cascadeSoundDistanceBlocks == 0) { return; } - if (world.random.nextInt(200) == 0 && canSeeWaterfall(world, blockPos, MinecraftClient.getInstance().player)) { + if (world.random.nextInt(200) == 0) { // check for player visibility to avoid underground cascades being heard on the surface, but that shit don't work: && canSeeWaterfall(world, blockPos, MinecraftClient.getInstance().player)) { client.getSoundManager().play(WaterfallSoundInstance.ambient(Effective.AMBIENCE_WATERFALL, 1.2f + world.random.nextFloat() / 10f, blockPos, EffectiveConfig.cascadeSoundDistanceBlocks), (int) (distance / 2)); } });