From 12c9a696ff24c9d92cc16cca2b3467ab780bef90 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 17 Sep 2022 09:50:34 +0200 Subject: added sound to clean end --- .../java/at/hannibal2/skyhanni/config/features/Dungeon.java | 3 ++- .../at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java b/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java index 6cc58f211..40f58df81 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java @@ -48,7 +48,8 @@ public class Dungeon { public boolean cleanEnd = false; @Expose - @ConfigOption(name = "Clean End", desc = "Hide entities and particles after the boss in Floor 1 - 6 has died.") + @ConfigOption(name = "Clean Ending", desc = "After the last dungeon boss has died, all entities and " + + "particles are no longer displayed and the music stops playing, but the loot chests are still displayed.") @ConfigEditorBoolean @ConfigAccordionId(id = 2) public boolean cleanEndToggle = false; diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index a78f4a64c..85a233619 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -105,9 +105,18 @@ class DungeonCleanEnd { } @SubscribeEvent - fun onReceivePacket(event: PlayParticleEvent) { + fun onPlayParticle(event: PlayParticleEvent) { if (shouldBlock()) { event.isCanceled = true } } + + @SubscribeEvent + fun onPlaySound(event: PlaySoundEvent) { + if (shouldBlock() && !chestsSpawned) { + if (event.soundName.startsWith("note.")) { + event.isCanceled = true + } + } + } } \ No newline at end of file -- cgit