aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 09:50:34 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 09:50:34 +0200
commit12c9a696ff24c9d92cc16cca2b3467ab780bef90 (patch)
tree0eca52d080568cbbd72de83fbb07de490ae21880 /src/main/java/at/hannibal2
parent96de0a0c8925cb9a75e2108c8997625bcac2f7ff (diff)
downloadskyhanni-12c9a696ff24c9d92cc16cca2b3467ab780bef90.tar.gz
skyhanni-12c9a696ff24c9d92cc16cca2b3467ab780bef90.tar.bz2
skyhanni-12c9a696ff24c9d92cc16cca2b3467ab780bef90.zip
added sound to clean end
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt11
2 files changed, 12 insertions, 2 deletions
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