aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java8
-rw-r--r--src/main/java/me/Danker/events/PostConfigInitEvent.java13
-rw-r--r--src/main/java/me/Danker/features/CustomMusic.java5
3 files changed, 19 insertions, 7 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 6322c33..280fc96 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -2,10 +2,7 @@ package me.Danker;
import com.google.gson.JsonObject;
import me.Danker.commands.*;
-import me.Danker.events.ChestSlotClickedEvent;
-import me.Danker.events.GuiChestBackgroundDrawnEvent;
-import me.Danker.events.ModInitEvent;
-import me.Danker.events.RenderOverlayEvent;
+import me.Danker.events.*;
import me.Danker.features.*;
import me.Danker.features.loot.*;
import me.Danker.features.puzzlesolvers.*;
@@ -181,9 +178,10 @@ public class DankersSkyblockMod {
MinecraftForge.EVENT_BUS.register(new TrophyFishTracker());
MinecraftForge.EVENT_BUS.register(new WolfTracker());
MinecraftForge.EVENT_BUS.register(new ZombieTracker());
-
+
MinecraftForge.EVENT_BUS.post(new ModInitEvent(configDirectory));
ConfigHandler.reloadConfig();
+ MinecraftForge.EVENT_BUS.post(new PostConfigInitEvent(configDirectory));
keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod");
keyBindings[1] = new KeyBinding("Regular Ability", Keyboard.KEY_NUMPAD4, "Danker's Skyblock Mod");
diff --git a/src/main/java/me/Danker/events/PostConfigInitEvent.java b/src/main/java/me/Danker/events/PostConfigInitEvent.java
new file mode 100644
index 0000000..3e58456
--- /dev/null
+++ b/src/main/java/me/Danker/events/PostConfigInitEvent.java
@@ -0,0 +1,13 @@
+package me.Danker.events;
+
+import net.minecraftforge.fml.common.eventhandler.Event;
+
+public class PostConfigInitEvent extends Event {
+
+ public final String configDirectory;
+
+ public PostConfigInitEvent(String configDirectory) {
+ this.configDirectory = configDirectory;
+ }
+
+}
diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java
index 6c5dd08..38e4ba0 100644
--- a/src/main/java/me/Danker/features/CustomMusic.java
+++ b/src/main/java/me/Danker/features/CustomMusic.java
@@ -3,6 +3,7 @@ package me.Danker.features;
import me.Danker.DankersSkyblockMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.events.ModInitEvent;
+import me.Danker.events.PostConfigInitEvent;
import me.Danker.handlers.ScoreboardHandler;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
@@ -218,7 +219,7 @@ public class CustomMusic {
}
@SubscribeEvent
- public void init(ModInitEvent event) {
+ public void postConfigInit(PostConfigInitEvent event) {
init(event.configDirectory);
}
@@ -237,7 +238,7 @@ public class CustomMusic {
phase4 = new Song(directory, "phasefour", phase4Volume);
phase5 = new Song(directory, "phasefive", phase5Volume);
hub = new Song(directory, "hub", hubVolume);
- island = new Song(directory, "island", hubVolume);
+ island = new Song(directory, "island", islandVolume);
dungeonHub = new Song(directory, "dungeonhub", dungeonHubVolume);
farmingIslands = new Song(directory, "farmingislands", farmingIslandsVolume);
goldMine = new Song(directory, "goldmine", goldMineVolume);