From 08848974d8ea83d692ce1c215fd0d4f30bf72ab5 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Sun, 2 Apr 2023 16:36:53 -0500 Subject: final changes hopefully --- src/main/kotlin/dulkirmod/DulkirMod.kt | 4 ++-- src/main/kotlin/dulkirmod/config/DulkirConfig.kt | 14 +++++++------- src/main/kotlin/dulkirmod/config/DulkirHud.kt | 17 ----------------- src/main/kotlin/dulkirmod/config/KeyHud.kt | 16 ++++++++++++++++ src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt | 2 -- 5 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 src/main/kotlin/dulkirmod/config/DulkirHud.kt create mode 100644 src/main/kotlin/dulkirmod/config/KeyHud.kt diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt index a484e00..1c46e08 100644 --- a/src/main/kotlin/dulkirmod/DulkirMod.kt +++ b/src/main/kotlin/dulkirmod/DulkirMod.kt @@ -2,7 +2,7 @@ package dulkirmod import dulkirmod.command.* import dulkirmod.config.DulkirConfig -import dulkirmod.config.DulkirHud +import dulkirmod.config.KeyHud import dulkirmod.events.ChatEvent import dulkirmod.features.* import dulkirmod.features.chat.AbiphoneDND @@ -132,7 +132,7 @@ class DulkirMod { val mc: Minecraft = Minecraft.getMinecraft() var config = DulkirConfig - var hud = DulkirHud() + var hud = KeyHud() var display: GuiScreen? = null val scope = CoroutineScope(EmptyCoroutineContext) diff --git a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt index 4a33803..6af452b 100644 --- a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt +++ b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt @@ -10,13 +10,6 @@ import dulkirmod.utils.Utils object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-config.json") { - @HUD( - name = "Wither Key Display", - category = "HUD", - subcategory = "Dungeons" - ) - var witherKeyDisplayHUD: DulkirHud = DulkirHud() - @Switch( name = "Patch Crimson Isle memory leak", description = "This is a temporary fix for the memory leak on crimson isles. It will be removed when Hypixel fixes the issue.", @@ -601,6 +594,13 @@ object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-conf ) var cancelReequip = false + @HUD( + name = "Wither Key Display", + category = "HUD", + subcategory = "Dungeons" + ) + var witherKeyDisplayHUD: KeyHud = KeyHud() + fun init() { initialize() addDependency("customMessage", "throttleNotifier") diff --git a/src/main/kotlin/dulkirmod/config/DulkirHud.kt b/src/main/kotlin/dulkirmod/config/DulkirHud.kt deleted file mode 100644 index 038e1f6..0000000 --- a/src/main/kotlin/dulkirmod/config/DulkirHud.kt +++ /dev/null @@ -1,17 +0,0 @@ -package dulkirmod.config -import cc.polyfrost.oneconfig.hud.TextHud -import dulkirmod.features.chat.DungeonKeyDisplay - - -class DulkirHud : TextHud(true) { - - - override fun getLines(lines: MutableList?, example: Boolean) { - if (example) { - lines?.add(0, "Wither Key Display") - return - } - if (DungeonKeyDisplay.hasKey) - lines?.add(0, "Key Obtained") - } -} \ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/config/KeyHud.kt b/src/main/kotlin/dulkirmod/config/KeyHud.kt new file mode 100644 index 0000000..ca7b2e4 --- /dev/null +++ b/src/main/kotlin/dulkirmod/config/KeyHud.kt @@ -0,0 +1,16 @@ +package dulkirmod.config +import cc.polyfrost.oneconfig.hud.TextHud +import dulkirmod.features.chat.DungeonKeyDisplay + + +class KeyHud : TextHud(true) { + + override fun getLines(lines: MutableList?, example: Boolean) { + if (example) { + lines?.add(0, "Wither Key Display") + return + } + if (DungeonKeyDisplay.hasKey) + lines?.add(0, "Key Obtained") + } +} \ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt index 4253b6f..fcbc2f3 100644 --- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt +++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt @@ -3,7 +3,6 @@ package dulkirmod.features import dulkirmod.DulkirMod.Companion.mc import dulkirmod.config.DulkirConfig import dulkirmod.utils.TabListUtils -import dulkirmod.utils.TextUtils import dulkirmod.utils.TitleUtils import dulkirmod.utils.Utils import net.minecraft.item.ItemStack @@ -40,7 +39,6 @@ fun brokenHypeNotif() { } } } - TextUtils.info(id) // check if a wither blade, then check if same id if (!(id matches "(HYPERION|ASTRAEA|SCYLLA|VALKYRIE)".toRegex())) { return -- cgit