diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-15 01:36:50 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-15 01:36:50 -0230 |
commit | 718740e85f48b57bf712a62f811cd4d34dd98450 (patch) | |
tree | 8d3c7751cf684fe98e513010233f7b7b46e3e351 /src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java | |
parent | 89fa98d85546eb93064ce4a2b66e79341750b577 (diff) | |
download | SkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.tar.gz SkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.tar.bz2 SkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.zip |
Updated important locations
Updated Config System (Thanks Moulberry)
Added Trackers Back with kill trackers
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java index 539a42f..1cb00bb 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java @@ -3,6 +3,7 @@ package com.thatgravyboat.skyblockhud; import com.google.common.collect.Sets; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.thatgravyboat.skyblockhud.api.KillTracking; import com.thatgravyboat.skyblockhud.api.LeaderboardGetter; import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent; import com.thatgravyboat.skyblockhud.commands.Commands; @@ -17,6 +18,8 @@ import com.thatgravyboat.skyblockhud.overlay.OverlayHud; import com.thatgravyboat.skyblockhud.overlay.RPGHud; import com.thatgravyboat.skyblockhud.playerstats.ActionBarParsing; import com.thatgravyboat.skyblockhud.seasons.SeasonDateHandler; +import com.thatgravyboat.skyblockhud.tracker.TrackerFileLoader; +import com.thatgravyboat.skyblockhud.tracker.TrackerHandler; import java.awt.*; import java.awt.datatransfer.StringSelection; import java.io.*; @@ -32,11 +35,13 @@ import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; +import net.minecraftforge.fml.common.network.FMLNetworkEvent; import org.lwjgl.input.Keyboard; @Mod(modid = SkyblockHud.MODID, version = SkyblockHud.VERSION) @@ -69,10 +74,9 @@ public class SkyblockHud { MinecraftForge.EVENT_BUS.register(new MinesHandler()); MinecraftForge.EVENT_BUS.register(new FarmingIslandHandler()); - /* DISABLE UNTIL NEW SYSTEM MinecraftForge.EVENT_BUS.register(new TrackerHandler()); - MinecraftForge.EVENT_BUS.register(new KillTrackerHandler()); - */ + MinecraftForge.EVENT_BUS.register(new KillTracking()); + MinecraftForge.EVENT_BUS.register(new HeldItemHandler()); ClientRegistry.registerKeyBinding(KeyBindings.map); @@ -99,7 +103,7 @@ public class SkyblockHud { configDirectory = event.getModConfigurationDirectory(); Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig)); - //Runtime.getRuntime().addShutdownHook(new Thread(() -> TrackerFileLoader.saveTrackerStatsFile(event.getModConfigurationDirectory()))); + Runtime.getRuntime().addShutdownHook(new Thread(() -> TrackerFileLoader.saveTrackerStatsFile(event.getModConfigurationDirectory()))); } public void saveConfig() { @@ -122,7 +126,7 @@ public class SkyblockHud { MinecraftForge.EVENT_BUS.register(new MiningHud()); } - /* DISABLE UNTIL NEW SYSTEM + // DISABLE UNTIL NEW SYSTEM @EventHandler public void loadComplete(FMLLoadCompleteEvent event){ @@ -138,7 +142,7 @@ public class SkyblockHud { TrackerFileLoader.saveTrackerStatsFile(configDirectory); } - */ + public static boolean hasSkyblockScoreboard() { Minecraft mc = Minecraft.getMinecraft(); |