diff options
| author | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
|---|---|---|
| committer | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
| commit | 43d07fc791e63bba61695e0d4b766b78eb699132 (patch) | |
| tree | 69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main | |
| parent | 71af70d22e9a55a58c36642a745e81aa91851375 (diff) | |
| download | DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2 DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip | |
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main')
28 files changed, 238 insertions, 230 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt index 3ce2c41..10c477d 100644 --- a/src/main/kotlin/dulkirmod/DulkirMod.kt +++ b/src/main/kotlin/dulkirmod/DulkirMod.kt @@ -1,7 +1,7 @@ package dulkirmod import dulkirmod.command.* -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.events.ChatEvent import dulkirmod.features.* import dulkirmod.features.chat.AbiphoneDND @@ -90,7 +90,7 @@ class DulkirMod { @SubscribeEvent fun onTick(event: ClientTickEvent) { - if (Config.noReverse3rdPerson && mc.gameSettings.thirdPersonView == 2) + if (DulkirConfig.noReverse3rdPerson && mc.gameSettings.thirdPersonView == 2) mc.gameSettings.thirdPersonView = 0 if (event.phase == TickEvent.Phase.START && display != null) { @@ -113,10 +113,10 @@ class DulkirMod { @SubscribeEvent fun onKey(event: KeyInputEvent) { - if (keyBinds[0].isPressed) display = config.gui() + if (keyBinds[0].isPressed) config.openGui() if (keyBinds[1].isPressed) { - Config.noReverse3rdPerson = !Config.noReverse3rdPerson - TextUtils.toggledMessage("No Selfie Camera", Config.noReverse3rdPerson) + DulkirConfig.noReverse3rdPerson = !DulkirConfig.noReverse3rdPerson + TextUtils.toggledMessage("No Selfie Camera", DulkirConfig.noReverse3rdPerson) } if (keyBinds[2].isPressed) { FarmingControlSchemeCommand.toggleControls(); @@ -130,7 +130,7 @@ class DulkirMod { const val CHAT_PREFIX = "§f<§3DulkirMod§f>§r" val mc: Minecraft = Minecraft.getMinecraft() - var config = Config + var config = DulkirConfig var display: GuiScreen? = null val scope = CoroutineScope(EmptyCoroutineContext) diff --git a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt index 36e8b69..7b489e7 100644 --- a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt +++ b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt @@ -10,7 +10,6 @@ class EnchantRuneCommand : ClientCommandBase("enchantrune") { override fun processCommand(sender: ICommandSender, args: Array<String>) { config.hideEnchantRune = !config.hideEnchantRune TextUtils.toggledMessage("Enchant Rune Hider", config.hideEnchantRune) - config.markDirty() - config.writeData() + config.save() } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/FairyCommand.kt b/src/main/kotlin/dulkirmod/command/FairyCommand.kt index a6c1b00..b8231b7 100644 --- a/src/main/kotlin/dulkirmod/command/FairyCommand.kt +++ b/src/main/kotlin/dulkirmod/command/FairyCommand.kt @@ -10,7 +10,6 @@ class FairyCommand : ClientCommandBase("fairy") { override fun processCommand(sender: ICommandSender, args: Array<String>) { config.hideHealerFairy = !config.hideHealerFairy TextUtils.toggledMessage("Healer Fairy Hider", config.hideHealerFairy) - config.markDirty() - config.writeData() + config.save() } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt b/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt index 8bbad18..5d67fb3 100644 --- a/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt +++ b/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.client.Minecraft import net.minecraft.client.settings.KeyBinding @@ -38,7 +38,7 @@ class FarmingControlSchemeCommand : ClientCommandBase("farmcontrols") { KeyBinding.setKeyBindState(jumpKey.keyCode, false) jumpKey.keyCode = 57 // 57 = space key code - minecraft.gameSettings.mouseSensitivity = Config.defaultSens / 2 + minecraft.gameSettings.mouseSensitivity = DulkirConfig.defaultSens / 2 } // Save the changes to the control settings diff --git a/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt b/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt index 200fa22..21d2e7e 100644 --- a/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt +++ b/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException import net.minecraft.command.ICommandSender @@ -8,7 +8,7 @@ import net.minecraft.command.ICommandSender class HurtCamCommand : ClientCommandBase("ouch") { @Throws(CommandException::class) override fun processCommand(sender: ICommandSender, args: Array<String>) { - Config.hurtCamIntensity = 7f + DulkirConfig.hurtCamIntensity = 7f TextUtils.info("§6§lOUCH! THAT HURT!") } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt index f6f5a5e..d5e58c4 100644 --- a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt +++ b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException import net.minecraft.command.ICommandSender @@ -24,7 +24,7 @@ class JoinDungeonCommand : ClientCommandBase("joindungeon") { } } catch (_: NumberFormatException) {} - if (Config.dungeonCommandConfirm) { + if (DulkirConfig.dungeonCommandConfirm) { TextUtils.info("§6Running command: $type$num") } TextUtils.sendMessage("/joindungeon $arguments") diff --git a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt index f4a86a9..d564acd 100644 --- a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt +++ b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TabListUtils import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException @@ -26,7 +26,7 @@ class LeapNameCommand : ClientCommandBase("hl") { else -> findUserNameFor(username, false) } if (foundPlayer) { - TextUtils.info("§6Selected Leap Highlight for username: §f${Config.highlightLeapName}§6.") + TextUtils.info("§6Selected Leap Highlight for username: §f${DulkirConfig.highlightLeapName}§6.") } } private fun findUserNameFor(input: String, isClassName: Boolean): Boolean { @@ -37,7 +37,7 @@ class LeapNameCommand : ClientCommandBase("hl") { for (l in scoreboardList) { if (l.contains(input)) { val strArr = l.split(" ") - Config.highlightLeapName = strArr[1] + DulkirConfig.highlightLeapName = strArr[1] return true } } @@ -51,7 +51,7 @@ class LeapNameCommand : ClientCommandBase("hl") { if (strArr.size < 2) continue val username = strArr[1] if (username.lowercase() == input.lowercase()) { - Config.highlightLeapName = username + DulkirConfig.highlightLeapName = username return true } } diff --git a/src/main/kotlin/dulkirmod/command/SettingsCommand.kt b/src/main/kotlin/dulkirmod/command/SettingsCommand.kt index 5f16652..9fa6964 100644 --- a/src/main/kotlin/dulkirmod/command/SettingsCommand.kt +++ b/src/main/kotlin/dulkirmod/command/SettingsCommand.kt @@ -5,6 +5,6 @@ import net.minecraft.command.ICommandSender class SettingsCommand : ClientCommandBase("dulkir") { override fun processCommand(sender: ICommandSender?, args: Array<out String>?) { - DulkirMod.display = DulkirMod.config.gui() + DulkirMod.config.openGui() } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/config/Config.kt b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt index 3745ee6..8ea114a 100644 --- a/src/main/kotlin/dulkirmod/config/Config.kt +++ b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt @@ -1,21 +1,20 @@ package dulkirmod.config +import cc.polyfrost.oneconfig.config.Config +import cc.polyfrost.oneconfig.config.annotations.* +import cc.polyfrost.oneconfig.config.data.Mod +import cc.polyfrost.oneconfig.config.data.ModType import dulkirmod.DulkirMod import dulkirmod.utils.Utils -import gg.essential.vigilance.Vigilant -import gg.essential.vigilance.data.Category -import gg.essential.vigilance.data.Property -import gg.essential.vigilance.data.PropertyType -import gg.essential.vigilance.data.SortingBehavior -import java.io.File -object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", sortingBehavior = ConfigSorting) { +object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-config.json") { - @Property( - type = PropertyType.SWITCH, + + @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.", - category = "General" + category = "General", + subcategory = "General" ) var crimsonIslesMemoryLeakPatch = true @@ -23,15 +22,16 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Hide Enchant Rune Particles", description = "ugly go bye-bye", - category = "General" + category = "General", + subcategory = "General" ) var hideEnchantRune = false - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Abiphone Do-Not-Disturb", description = "Detects incoming calls and mutes ring audio for like 5 seconds. \nWorks as long as u don't lag particularly hard at the same time you're being called.", - category = "General" + category = "General", + subcategory = "General" ) var abiDND = false @@ -39,15 +39,16 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Abiphone Caller ID", description = "If DND is on, still give the player a quick 1 liner to tell them who is calling.", - category = "General" + category = "General", + subcategory = "General" ) var abiCallerID = false - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Hurt Cam Slider", description = "more or less ouchie", - category = "General" + category = "General", + subcategory = "General" ) var hurtCamSlider = false @@ -62,54 +63,54 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so ) var hurtCamIntensity = 1f - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Tooltip Features", description = "Turns on scrollable and (optional) scalable tooltips.", - category = "General" + category = "General", + subcategory = "General" ) var scaledTooltips = false - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Tooltip Scale", description = "1 is default", category = "General", - minF = 0f, - maxF = 2f, - decimalPlaces = 1 + subcategory = "General", + min = 0f, + max = 2f, + step = 0 ) var tooltipSize = 1f - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Hide Healer fairy", description = "Now only runs in dungeons lol", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var hideHealerFairy = false - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Hide Heart Particles", description = "Useful for hyperion and healer bullshit", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var hideHeartParticles = false - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Throttle Notifier", description = "Im pretty sure this is mostly patched? Idk I'm leaving it in", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var throttleNotifier = true - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Vanquisher Broadcaster", description = "sends patcher sendcoords msg when you spawn a vanquisher. might make this put a waypoint later", - category = "Random Beta Features" + category = "Random Beta Features", + subcategory = "Random Beta Features" ) var vanqBroadcast = false @@ -118,6 +119,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Throttle Notifier String", description = "How do you want to tell people you are throttled?", category = "Dungeons", + subcategory = "Dungeons", placeholder = "i am being throttled zzz", protectedText = false ) @@ -127,7 +129,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Throttle Notifier Spam", description = "LET EM KNOW!", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var throttleNotifierSpam = true @@ -135,23 +138,24 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "M7 Dragon Timer", description = "Large in-world text timers to help you see when dragons will spawn.", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var dragonTimer = true - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Better M7 Dragon Killbox", description = "Mostly stolen from odin", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var dragonKillBox = true - @Property( - type = PropertyType.SWITCH, + @Switch( name = "Hide Extra Nametags", description = "Prevents some nametags not covered by skytils \"Hide non-starred nametags\" from rendering.", - category = "General" + category = "General", + subcategory = "General" ) var hideTags = true @@ -160,7 +164,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Global Toggle", description = "Change the look of your held item", - category = "Animations" + category = "Animations", + subcategory = "Animations" ) var customAnimations = false @@ -169,17 +174,18 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Size", description = "Scales the size of your currently held item. Default: 0", category = "Animations", - minF = -1.5f, - maxF = 1.5f, - decimalPlaces = 2 + subcategory = "Dungeons", + min = -1.5f, + max = 1.5f, + step = 0 ) var customSize = 0f - @Property( - type = PropertyType.CHECKBOX, + @Checkbox( name = "Scale Swing", description = "Also scale the size of the swing animation.", - category = "Animations" + category = "Animations", + subcategory = "Animations" ) var doesScaleSwing = true @@ -194,69 +200,69 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so ) var customX = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Y", description = "Moves the held item. Default: 0", category = "Animations", - minF = -1.5f, - maxF = 1.5f, - decimalPlaces = 2 + subcategory = "Animations", + min = -1.5f, + max = 1.5f, + step = 0 ) var customY = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Z", description = "Moves the held item. Default: 0", category = "Animations", - minF = -1.5f, - maxF = 1.5f, - decimalPlaces = 2 + subcategory = "Animations", + min = -1.5f, + max = 1.5f, + step = 0 ) var customZ = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Yaw", description = "Rotates your held item. Default: 0", category = "Animations", - minF = -180f, - maxF = 180f, - decimalPlaces = 0 + subcategory = "Animations", + min = -180f, + max = 180f, + step = 1 ) var customYaw = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Pitch", description = "Rotates your held item. Default: 0", category = "Animations", - minF = -180f, - maxF = 180f, - decimalPlaces = 0 + subcategory = "Animations", + min = -180f, + max = 180f, + step = 1 ) var customPitch = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Roll", description = "Rotates your held item. Default: 0", category = "Animations", - minF = -180f, - maxF = 180f, - decimalPlaces = 0 + subcategory = "Animations", + min = -180f, + max = 180f, + step = 1 ) var customRoll = 0f - @Property( - type = PropertyType.DECIMAL_SLIDER, + @Slider( name = "Speed", description = "Speed of the swing animation.", category = "Animations", - minF = -2f, - maxF = 1f, - decimalPlaces = 2 + subcategory = "Animations", + min = -2f, + max = 1f, + step = 0 ) var customSpeed = 0f @@ -264,7 +270,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.CHECKBOX, name = "Ignore Haste", description = "Makes the chosen speed override haste modifiers.", - category = "Animations" + category = "Animations", + subcategory = "Animations", ) var ignoreHaste = true @@ -273,6 +280,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Drinking Fix", description = "Pick how to handle drinking animations.", category = "Animations", + subcategory = "Fixes", options = ["No fix", "Rotationless", "Fixed"] ) var drinkingSelector = 2 @@ -302,28 +310,28 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Export Preset as String", description = "Base64 representation of your current config - will copy to clipboard when pressed.", category = "Animations", - subcategory = "Presets" + subcategory = "Presets", + text = "Export!" ) - fun presetString() { - Utils.animationConfigToString() - } + fun presetString() = Utils.animationConfigToString() - @Property( - type = PropertyType.BUTTON, + + @Button( name = "Import Preset from Clipboard", description = "Base64 representation of your config accepted from clipboard. Closes gui.", category = "Animations", - subcategory = "Presets" + subcategory = "Presets", + text = "Import!" ) - fun stringToConfig() { - Utils.animationStringtoConfig() - } + fun stringToConfig() = Utils.animationStringtoConfig() + @Property( type = PropertyType.SWITCH, name = "JoinDungeon Command Confirmation", description = "Chat notification when you push the button. Useful if you suck at navigating a numpad.", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var dungeonCommandConfirm = true @@ -331,7 +339,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Hide Chests that are already opened at Croesus", description = "Just doesn't render the item if it has the chest opened string", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var hideOpenedChests = false @@ -339,7 +348,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Highlight custom player for leap in menu", description = "Changes texture to green wool! Use the \"/hl\" command for convenient assignment.", - category = "Dungeons" + category = "Dungeons", + subcategory = "Dungeons" ) var highlightLeap = false @@ -348,6 +358,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Highlighted player name", description = "case-sensitive", category = "Dungeons", + subcategory = "Dungeons", placeholder = "Dilkur", protectedText = false ) @@ -357,7 +368,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Remove Selfie Camera", description = "Get rid of pesky reverse third person!", - category = "General" + category = "General", + subcategory = "General" ) var noReverse3rdPerson = false @@ -365,7 +377,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Bridge Bot Formatter", description = "Global Toggle", - category = "Bridge" + category = "Bridge", + subcategory = "Bridge" ) var bridgeBot = false @@ -374,6 +387,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Bridge Bot Name", description = "Not case-sensitive", category = "Bridge", + subcategory = "Bridge", placeholder = "Bweefing", protectedText = false ) @@ -384,6 +398,7 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so name = "Bridge Chatter Name Color", description = "Pick how the player name looks.", category = "Bridge", + subcategory = "Bridge", options = ["§0Black", "§1Dark Blue", "§2Dark Green", @@ -571,7 +586,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Garden Visitor Alert", description = "Notifies you if you have max garden visitors in queue", - category = "Farming" + category = "Farming", + subcategory = "Farming" ) var notifyMaxVisitors = false @@ -579,7 +595,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Persistent alert", description = "If turned on, the alert will continue to flash until dealt with.", - category = "Farming" + category = "Farming", + subcategory = "Farming" ) var persistentAlert = true @@ -598,7 +615,8 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so type = PropertyType.SWITCH, name = "Turn off re-equip animation", description = "Will stop the spam re-equip when stuff like cultivating is updating", - category = "Animations" + category = "Animations", + subcategory = "Fixes" ) var cancelReequip = false @@ -614,14 +632,6 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so addDependency("tooltipSize", "scaledTooltips") addDependency("persistentAlert", "notifyMaxVisitors") - setCategoryDescription( - "Custom Animations", - "All settings that are related to custom animations. Mostly help from Aton." - ) - setCategoryDescription( - "Bridge", - "Dm me on discord with formatting issues." - ) } private object ConfigSorting : SortingBehavior() { diff --git a/src/main/kotlin/dulkirmod/features/AlarmClock.kt b/src/main/kotlin/dulkirmod/features/AlarmClock.kt index f4c11d4..4792259 100644 --- a/src/main/kotlin/dulkirmod/features/AlarmClock.kt +++ b/src/main/kotlin/dulkirmod/features/AlarmClock.kt @@ -1,7 +1,7 @@ package dulkirmod.features import dulkirmod.DulkirMod.Companion.mc -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.ScoreBoardUtils import dulkirmod.utils.TitleUtils import dulkirmod.utils.Utils @@ -16,20 +16,20 @@ fun alarmClock() { val lines = ScoreBoardUtils.getLines() for (l in lines) { // ZOMBIE VILLAGER - if (Config.notifyZombieVillager && l.contains("8:00pm") && (currTime - lastUpdate) > 15000) { + if (DulkirConfig.notifyZombieVillager && l.contains("8:00pm") && (currTime - lastUpdate) > 15000) { lastUpdate = currTime - val color = Utils.getColorString(Config.bestiaryNotifColor) + val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor) TitleUtils.drawStringForTime("${color}Zombie Villager", 5000) - if (Config.bestiaryAlertSounds) - mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f) + if (DulkirConfig.bestiaryAlertSounds) + mc.thePlayer.playSound("mob.villager.yes", 1f * DulkirConfig.bestiaryNotifVol, 0f) } // GHASTS - else if (Config.notifyGhast && l.contains("9:00pm") && (currTime - lastUpdate) > 15000) { + else if (DulkirConfig.notifyGhast && l.contains("9:00pm") && (currTime - lastUpdate) > 15000) { lastUpdate = currTime - val color = Utils.getColorString(Config.bestiaryNotifColor) + val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor) TitleUtils.drawStringForTime("${color}Ghast", 5000) - if (Config.bestiaryAlertSounds) - mc.thePlayer |
