diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-07-31 20:05:00 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-07-31 20:05:00 -0400 |
commit | d807469333b343e7726536b12d13ff29e3b136c5 (patch) | |
tree | bfe909d024a885bc8c6586e57197ed2427c5612d /src | |
parent | a49b673bd9badcb7c4c02539f53c39c5b52c1b32 (diff) | |
download | SkyblockMod-d807469333b343e7726536b12d13ff29e3b136c5.tar.gz SkyblockMod-d807469333b343e7726536b12d13ff29e3b136c5.tar.bz2 SkyblockMod-d807469333b343e7726536b12d13ff29e3b136c5.zip |
Shuffle custom music at end of song
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/Danker/features/CustomMusic.java | 82 |
1 files changed, 36 insertions, 46 deletions
diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java index d61b640..16fef34 100644 --- a/src/main/java/me/Danker/features/CustomMusic.java +++ b/src/main/java/me/Danker/features/CustomMusic.java @@ -27,8 +27,6 @@ import java.util.Random; public class CustomMusic { static boolean cancelNotes; - static boolean prevInDungeonBossRoom = false; - public static boolean inDungeonBossRoom = false; public static Song dungeonboss; public static int dungeonbossVolume; public static Song bloodroom; @@ -74,7 +72,6 @@ public class CustomMusic { if (DankersSkyblockMod.tickAmount % 10 == 0) { if (world != null && player != null) { if (Utils.inDungeons) { - prevInDungeonBossRoom = inDungeonBossRoom; List<String> scoreboard = ScoreboardHandler.getSidebarLines(); if (scoreboard.size() > 2) { String firstLine = ScoreboardHandler.cleanSB(scoreboard.get(scoreboard.size() - 1)); @@ -88,51 +85,45 @@ public class CustomMusic { firstLine.contains("sadan") || // F6 firstLine.contains("necron")) { // F7 - inDungeonBossRoom = true; - if (!prevInDungeonBossRoom) { - bloodroom.stop(); if (ToggleCommand.dungeonBossMusic) dungeonboss.start(); } - } else { - inDungeonBossRoom = false; } - } - } else { - switch (Utils.tabLocation) { - case "Hub": - if (ToggleCommand.hubMusic) hub.start(); - break; - case "Private World": - if (ToggleCommand.islandMusic) island.start(); - break; - case "Dungeon Hub": - if (ToggleCommand.dungeonHubMusic) dungeonHub.start(); - break; - case "The Farming Islands": - if (ToggleCommand.farmingIslandsMusic) farmingIslands.start(); - break; - case "Gold Mine": - if (ToggleCommand.goldMineMusic) goldMine.start(); - break; - case "Deep Caverns": - if (ToggleCommand.deepCavernsMusic) deepCaverns.start(); - break; - case "Dwarven Mines": - if (ToggleCommand.dwarvenMinesMusic) dwarvenMines.start(); - break; - case "Crystal Hollows": - if (ToggleCommand.crystalHollowsMusic) crystalHollows.start(); - break; - case "Blazing Fortress": - if (ToggleCommand.blazingFortressMusic) blazingFortress.start(); - break; - case "The End": - if (ToggleCommand.endMusic) end.start(); - break; - case "The Park": - if (ToggleCommand.parkMusic) park.start(); - break; - } + } else { + switch (Utils.tabLocation) { + case "Hub": + if (ToggleCommand.hubMusic) hub.start(); + break; + case "Private World": + if (ToggleCommand.islandMusic) island.start(); + break; + case "Dungeon Hub": + if (ToggleCommand.dungeonHubMusic) dungeonHub.start(); + break; + case "The Farming Islands": + if (ToggleCommand.farmingIslandsMusic) farmingIslands.start(); + break; + case "Gold Mine": + if (ToggleCommand.goldMineMusic) goldMine.start(); + break; + case "Deep Caverns": + if (ToggleCommand.deepCavernsMusic) deepCaverns.start(); + break; + case "Dwarven Mines": + if (ToggleCommand.dwarvenMinesMusic) dwarvenMines.start(); + break; + case "Crystal Hollows": + if (ToggleCommand.crystalHollowsMusic) crystalHollows.start(); + break; + case "Blazing Fortress": + if (ToggleCommand.blazingFortressMusic) blazingFortress.start(); + break; + case "The End": + if (ToggleCommand.endMusic) end.start(); + break; + case "The Park": + if (ToggleCommand.parkMusic) park.start(); + break; + } } } } @@ -242,7 +233,6 @@ public class CustomMusic { cancelNotes = true; music.setMicrosecondPosition(0); music.start(); - music.loop(Clip.LOOP_CONTINUOUSLY); } } |