aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
committeringlettronald <inglettronald@gmail.com>2023-03-25 04:36:31 -0500
commit43d07fc791e63bba61695e0d4b766b78eb699132 (patch)
tree69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main
parent71af70d22e9a55a58c36642a745e81aa91851375 (diff)
downloadDulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2
DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/dulkirmod/DulkirMod.kt12
-rw-r--r--src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt3
-rw-r--r--src/main/kotlin/dulkirmod/command/FairyCommand.kt3
-rw-r--r--src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/HurtCamCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/LeapNameCommand.kt8
-rw-r--r--src/main/kotlin/dulkirmod/command/SettingsCommand.kt2
-rw-r--r--src/main/kotlin/dulkirmod/config/DulkirConfig.kt (renamed from src/main/kotlin/dulkirmod/config/Config.kt)230
-rw-r--r--src/main/kotlin/dulkirmod/features/AlarmClock.kt18
-rw-r--r--src/main/kotlin/dulkirmod/features/ArachneTimer.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/Croesus.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/DragonTimer.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/DungeonLeap.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt22
-rw-r--r--src/main/kotlin/dulkirmod/features/HurtCamSlider.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/MatchoAlert.kt10
-rw-r--r--src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt4
-rw-r--r--src/main/kotlin/dulkirmod/features/ScalableTooltips.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/Bridge.kt20
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt6
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt4
-rw-r--r--src/main/kotlin/dulkirmod/utils/ConfigData.kt24
-rw-r--r--src/main/kotlin/dulkirmod/utils/TitleUtils.kt6
-rw-r--r--src/main/kotlin/dulkirmod/utils/Utils.kt24
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.playSound("mob.ghast.scream", 1f * Config.bestiaryNotifVol, 1f)
+ if (DulkirConfig.bestiaryAlertSounds)
+ mc.thePlayer.playSound("mob.ghast.scream", 1f * DulkirConfig.bestiaryNotifVol, 1f)
}
}
diff --git a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
index 4cb63f9..7cbcd5f 100644
--- a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
@@ -1,6 +1,6 @@
package dulkirmod.features
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
import dulkirmod.utils.Utils
import dulkirmod.utils.WorldRenderUtils
@@ -18,7 +18,7 @@ object ArachneTimer {
@SubscribeEvent(receiveCanceled = true, priority = EventPriority.LOW)
fun onChat(event: ClientChatReceivedEvent) {
- if (!Config.arachneKillTimer) return
+ if (!DulkirConfig.arachneKillTimer) return
var killtime: Float = -1f
@@ -46,10 +46,10 @@ object ArachneTimer {
@SubscribeEvent
fun onWorldRenderLast(event: RenderWorldLastEvent) {
- if (!Config.arachneSpawnTimer) return
+ if (!DulkirConfig.arachneSpawnTimer) return
if (spawnmillis > startmillis) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
var time: Int
time = if (bigboy) {
(40 - (System.currentTimeMillis() - spawnmillis) / 1000).toInt()
diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
index 589c046..f2c8c0e 100644
--- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -13,7 +13,7 @@ var oldChampionXp = -1.0
var oldID = ""
fun brokenHypeNotif() {
- if (!Config.notifyHype) return
+ if (!DulkirConfig.notifyHype) return
var kill = -1
var championXp = -1.0
@@ -59,8 +59,8 @@ fun brokenHypeNotif() {
// If this section of the code is reached, then we have the same item, and we can check for updated stats
if (oldKill != kill && oldChampionXp == championXp && TabListUtils.area != "Private Island") {
- mc.thePlayer.playSound("random.anvil_land", 1f * Config.bestiaryNotifVol, 0f)
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ mc.thePlayer.playSound("random.anvil_land", 1f * DulkirConfig.bestiaryNotifVol, 0f)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Hype Broken", 5000)
}
// update item regardless of whether it is bugged or not
diff --git a/src/main/kotlin/dulkirmod/features/Croesus.kt b/src/main/kotlin/dulkirmod/features/Croesus.kt
index ea8b022..9369140 100644
--- a/src/main/kotlin/dulkirmod/features/Croesus.kt
+++ b/src/main/kotlin/dulkirmod/features/Croesus.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ContainerNameUtil
import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.inventory.Slot
@@ -19,7 +19,7 @@ object Croesus {
val lastInCroesus = inCroesusBool
var pageNumber = 1
- if (!Config.hideOpenedChests) return
+ if (!DulkirConfig.hideOpenedChests) return
if (mc.currentScreen == null || !(mc.currentScreen is GuiChest)) {
inCroesusBool = false
return
diff --git a/src/main/kotlin/dulkirmod/features/DragonTimer.kt b/src/main/kotlin/dulkirmod/features/DragonTimer.kt
index ad1506f..c8affee 100644
--- a/src/main/kotlin/dulkirmod/features/DragonTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/DragonTimer.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.WorldRenderUtils
import net.minecraft.util.BlockPos
@@ -30,7 +30,7 @@ object DragonTimer {
* Called from within the MixinWorld Class
*/
fun handleNewParticle(pID: Int, x: Double, y: Double, z: Double) {
- if (!Config.dragonTimer) return
+ if (!DulkirConfig.dragonTimer) return
if (!ScoreBoardUtils.isInM7) return
if (pID != 26) return
@@ -46,7 +46,7 @@ object DragonTimer {
fun onRenderWorld(event: RenderWorldLastEvent) {
renderDragonBoxes()
- if (!Config.dragonTimer) return
+ if (!DulkirConfig.dragonTimer) return
if (!ScoreBoardUtils.isInM7) return
val curTime = System.currentTimeMillis()
@@ -116,7 +116,7 @@ object DragonTimer {
}
private fun renderDragonBoxes() {
- if (!Config.dragonKillBox) return
+ if (!DulkirConfig.dragonKillBox) return
if (!ScoreBoardUtils.isInM7) return
if (mc.thePlayer.positionVector.yCoord > 45) return
// Blue
diff --git a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
index bfbfe50..5185516 100644
--- a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
+++ b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.ContainerNameUtil
import dulkirmod.utils.Utils
import net.minecraft.client.gui.inventory.GuiChest
@@ -19,7 +19,7 @@ object DungeonLeap {
fun onTick(event: TickEvent.ClientTickEvent) {
val lastInLeap = inLeapMenu
- if (!Config.highlightLeap) return
+ if (!DulkirConfig.highlightLeap) return
if (mc.currentScreen == null || mc.currentScreen !is GuiChest) {
inLeapMenu = false
return
@@ -37,7 +37,7 @@ object DungeonLeap {
if (slotIn.stack == null) continue
val stack = slotIn.stack
- if (Utils.stripColorCodes(stack.displayName).equals(Config.highlightLeapName, true)) {
+ if (Utils.stripColorCodes(stack.displayName).equals(DulkirConfig.highlightLeapName, true)) {
leapPlayers[i - 11] = true
}
}
diff --git a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
index 8bcd145..0bf6bbe 100644
--- a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
+++ b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -11,7 +11,7 @@ object GardenVisitorAlert {
private var lastAlert = 0
fun alert() {
- if (!Config.notifyMaxVisitors) return
+ if (!DulkirConfig.notifyMaxVisitors) return
if (!Utils.isInSkyblock()) return
if (TabListUtils.area != "Garden") {
@@ -19,24 +19,24 @@ object GardenVisitorAlert {
}
if (TabListUtils.maxVisitors && !hasSentAlert) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Max Visitors", 5000)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f)
hasSentAlert = true
lastAlert = System.currentTimeMillis().toInt()
} else if (!TabListUtils.maxVisitors) hasSentAlert = false
val timeSinceLastAlert = System.currentTimeMillis().toInt() - lastAlert
- if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && Config.persistentAlert) {
+ if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && DulkirConfig.persistentAlert) {
lastAlert = System.currentTimeMillis().toInt()
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Max Visitors", 5000)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f)
- DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f)
+ DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f)
}
}
diff --git a/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt b/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
index 7237d95..4ba4798 100644
--- a/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
+++ b/src/main/kotlin/dulkirmod/features/HurtCamSlider.kt
@@ -1,14 +1,14 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.entity.EntityLivingBase
import net.minecraft.util.MathHelper
object HurtCamSlider {
fun renderHurt(partialTicks: Float): Boolean {
- if (!Config.hurtCamSlider) return false
+ if (!DulkirConfig.hurtCamSlider) return false
if (mc.renderViewEntity is EntityLivingBase) {
val entitylivingbase = mc.renderViewEntity as EntityLivingBase
var f: Float = (entitylivingbase.hurtTime.toFloat() - partialTicks)
@@ -23,7 +23,7 @@ object HurtCamSlider {
f = MathHelper.sin(f * f * f * f * Math.PI.toFloat())
val f2 = entitylivingbase.attackedAtYaw
GlStateManager.rotate(-f2, 0.0f, 1.0f, 0.0f)
- GlStateManager.rotate(-f * 14.0f * Config.hurtCamIntensity, 0.0f, 0.0f, 1.0f)
+ GlStateManager.rotate(-f * 14.0f * DulkirConfig.hurtCamIntensity, 0.0f, 0.0f, 1.0f)
GlStateManager.rotate(f2, 0.0f, 1.0f, 0.0f)
}
return true
diff --git a/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt b/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
index c65b3dd..a8770c2 100644
--- a/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
+++ b/src/main/kotlin/dulkirmod/features/KeeperWaypoints.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.Utils
import dulkirmod.utils.WorldRenderUtils
@@ -13,7 +13,7 @@ import kotlin.math.max
object KeeperWaypoints {
@SubscribeEvent
fun onWorldRenderLast(event: RenderWorldLastEvent) {
- if (!Config.keeperWaypoints) return
+ if (!DulkirConfig.keeperWaypoints) return
if (TabListUtils.area != "Spider's Den") return
val vec1 = Vec3(-208.5, 44.5, -259.5)
@@ -37,7 +37,7 @@ object KeeperWaypoints {
val scale8 = max(1f, playerVec.distanceTo(vec8).toFloat()/10f)
val scale9 = max(1f, playerVec.distanceTo(vec9).toFloat()/10f)
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
WorldRenderUtils.renderString(vec1, "${color}1", false, scale1, true)
WorldRenderUtils.renderString(vec2, "${color}2", false, scale2, true)
WorldRenderUtils.renderString(vec3, "${color}3", false, scale3, true)
diff --git a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
index 50f433e..54abc99 100644
--- a/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
+++ b/src/main/kotlin/dulkirmod/features/MatchoAlert.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TitleUtils
import dulkirmod.utils.Utils
@@ -11,7 +11,7 @@ object MatchoAlert {
var hasSentAlert = false
fun alert() {
- if (!Config.notifyMatcho) return
+ if (!DulkirConfig.notifyMatcho) return
if (!Utils.isInSkyblock()) return
if (TabListUtils.area != "Crimson Isle") {
@@ -19,10 +19,10 @@ object MatchoAlert {
}
if (TabListUtils.explosivity && !hasSentAlert) {
- val color = Utils.getColorString(Config.bestiaryNotifColor)
+ val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor)
TitleUtils.drawStringForTime("${color}Matcho", 5000)
- if (Config.bestiaryAlertSounds)
- DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * Config.bestiaryNotifVol, 0f)
+ if (DulkirConfig.bestiaryAlertSounds)
+ DulkirMod.mc.thePlayer.playSound("mob.villager.yes", 1f * DulkirConfig.bestiaryNotifVol, 0f)
hasSentAlert = true
} else if (!TabListUtils.explosivity) hasSentAlert = false
}
diff --git a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
index dd69f24..dcb46ef 100644
--- a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
+++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.entity.Entity
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -11,7 +11,7 @@ object MemoryLeakFix {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
- if (!Config.crimsonIslesMemoryLeakPatch) return
+ if (!DulkirConfig.crimsonIslesMemoryLeakPatch) return
if (System.currentTimeMillis() - lastClear >= 30000L) {
val world = mc.theWorld ?: return
diff --git a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
index 7d1d623..53cb9ea 100644
--- a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
+++ b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
@@ -1,7 +1,7 @@
package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.gui.GuiChat
@@ -28,7 +28,7 @@ object ScalableTooltips {
screenHeight: Int,
font: FontRenderer,
): Boolean {
- if(!Config.scaledTooltips) return false
+ if(!DulkirConfig.scaledTooltips) return false
if(textLines.isEmpty()) return true
// Calculate the amount of translation that should be applied based on how much the user has scrolled
@@ -59,7 +59,7 @@ object ScalableTooltips {
}
}
- val scale = (Config.tooltipSize + scaleScale).coerceAtLeast(0f)
+ val scale = (DulkirConfig.tooltipSize + scaleScale).coerceAtLeast(0f)
// Calculate the width and height of the tooltip box
var width = 0
diff --git a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
index 9b429cb..0d6f47f 100644
--- a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt
@@ -1,6 +1,6 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.sound.PlaySoundEvent
@@ -14,7 +14,7 @@ object AbiphoneDND {
//BLOCK ABIPHONE SOUNDS
@SubscribeEvent(receiveCanceled = false, priority = EventPriority.LOW)
fun onSound(event: PlaySoundEvent) {
- if (!Config.abiDND) return
+ if (!DulkirConfig.abiDND) return
if (System.currentTimeMillis() - lastRing < 5000) {
if (event.name == "note.pling" && event.sound.volume == 0.69f && event.sound.pitch == 1.6666666f) {
event.result = null
@@ -23,12 +23,12 @@ object AbiphoneDND {
}
fun handle(event: ClientChatReceivedEvent, unformatted: String) {
- if (!Config.abiDND) return
+ if (!DulkirConfig.abiDND) return
if (unformatted matches abiphoneFormat) {
val matchResult = abiphoneFormat.find(unformatted)
event.isCanceled = true
lastRing = System.currentTimeMillis()
- if (Config.abiCallerID) {
+ if (DulkirConfig.abiCallerID) {
val blocked = if (Math.random() < .001) "Breefing"
else matchResult?.groups?.get(1)?.value
TextUtils.info("§6Call blocked from $blocked!")
diff --git a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
index 83efb98..245fe22 100644
--- a/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/Bridge.kt
@@ -1,6 +1,6 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.Utils
import net.minecraft.util.ChatComponentText
import net.minecraft.util.EnumChatFormatting
@@ -16,12 +16,12 @@ object Bridge {
fun handle(event: ClientChatReceivedEvent) {
val message = event.message.unformattedText
- if (guildFormat matches message && Config.bridgeBot) {
+ if (guildFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = guildFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -32,12 +32,12 @@ object Bridge {
}
// OTHER FORMAT
- else if (alternateFormat matches message && Config.bridgeBot) {
+ else if (alternateFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = alternateFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
@@ -47,12 +47,12 @@ object Bridge {
}
}
- else if (otherAltFormat matches message && Config.bridgeBot) {
+ else if (otherAltFormat matches message && DulkirConfig.bridgeBot) {
val matchResult = otherAltFormat.find(message)
val (prefix, name, playerName) = matchResult!!.destructured
- if (Utils.stripColorCodes(name.lowercase()) == Config.botName.lowercase()) {
+ if (Utils.stripColorCodes(name.lowercase()) == DulkirConfig.botName.lowercase()) {
val newPrefix = if (prefix == "§2Guild") "§2Bridge" else "§3Bridge"
- val color = if (Config.bridgeColor == 16) "§z" else EnumChatFormatting.values()[Config.bridgeColor]
+ val color = if (DulkirConfig.bridgeColor == 16) "§z" else EnumChatFormatting.values()[DulkirConfig.bridgeColor]
event.message.siblings[0] = ChatComponentText(
"$newPrefix > $color$playerName§f: "
)
diff --git a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
index fbd2437..736ee43 100644
--- a/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/ThrottleNotif.kt
@@ -1,7 +1,7 @@
package dulkirmod.features.chat
import dulkirmod.DulkirMod
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TabListUtils
import dulkirmod.utils.TextUtils
import net.minecraftforge.client.event.ClientChatReceivedEvent
@@ -13,9 +13,9 @@ object ThrottleNotif {
&& TabListUtils.isInDungeons
) {
event.isCanceled = true
- if (!Config.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
+ if (!DulkirConfig.throttleNotifierSpam && System.currentTimeMillis() - lastThrottle > 8000) {
TextUtils.sendPartyChatMessage(DulkirMod.config.customMessage)
- } else if (Config.throttleNotifierSpam) {
+ } else if (DulkirConfig.throttleNotifierSpam) {
TextUtils.sendPartyChatMessage(DulkirMod.config.customMessage)
}
lastThrottle = System.currentTimeMillis()
diff --git a/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
index d607df2..93d15d2 100644
--- a/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
+++ b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
@@ -1,11 +1,11 @@
package dulkirmod.features.chat
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import dulkirmod.utils.TextUtils
object VanquisherTrigger {
fun handle(message: String) {
- if (!Config.vanqBroadcast) return
+ if (!DulkirConfig.vanqBroadcast) return
if (message == "A Vanquisher is spawning nearby!") {
TextUtils.sendMessage("/patcher sendcoords")
}
diff --git a/src/main/kotlin/dulkirmod/utils/ConfigData.kt b/src/main/kotlin/dulkirmod/utils/ConfigData.kt
index b881248..60a4a0f 100644
--- a/src/main/kotlin/dulkirmod/utils/ConfigData.kt
+++ b/src/main/kotlin/dulkirmod/utils/ConfigData.kt
@@ -1,17 +1,17 @@
package dulkirmod.utils
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
data class ConfigData(
- val size: Float = Config.customSize,
- val scaleSwing: Boolean = Config.doesScaleSwing,
- val x: Float = Config.customX,
- val y: Float = Config.customY,
- val z: Float = Config.customZ,
- val yaw: Float = Config.customYaw,
- val pitch: Float = Config.customPitch,
- val roll: Float = Config.customRoll,
- val speed: Float = Config.customSpeed,
- val ignoreHaste: Boolean = Config.ignoreHaste,
- val drinkingFix: Int = Config.drinkingSelector,
+ val size: Float = DulkirConfig.customSize,
+ val scaleSwing: Boolean = DulkirConfig.doesScaleSwing,
+ val x: Float = DulkirConfig.customX,
+ val y: Float = DulkirConfig.customY,
+ val z: Float = DulkirConfig.customZ,
+ val yaw: Float = DulkirConfig.customYaw,
+ val pitch: Float = DulkirConfig.customPitch,
+ val roll: Float = DulkirConfig.customRoll,
+ val speed: Float = DulkirConfig.customSpeed,
+ val ignoreHaste: Boolean = DulkirConfig.ignoreHaste,
+ val drinkingFix: Int = DulkirConfig.drinkingSelector,
)
diff --git a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
index 8932878..f5c6325 100644
--- a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt
@@ -1,7 +1,7 @@
package dulkirmod.utils
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.gui.ScaledResolution
import net.minecraft.client.renderer.GlStateManager
import net.minecraftforge.client.event.RenderGameOverlayEvent
@@ -18,12 +18,12 @@ object TitleUtils {
val width = mc.fontRendererObj.getStringWidth(curString)
val screenWidth = ScaledResolution(mc).scaledWidth_double
val screenHeight = ScaledResolution(mc).scaledHeight_double
- var scale = ((screenWidth - 100) * Config.bestiaryNotifSize) / width
+ var scale = ((screenWidth - 100) * DulkirConfig.bestiaryNotifSize) / width
scale = min(scale, 10.0)
GlStateManager.pushMatrix()
GlStateManager.translate((screenWidth / 2 - width * scale / 2), screenHeight / 2 - (4.5 * scale), 0.0)
GlStateManager.scale(scale, scale, scale)
- mc.fontRendererObj.drawString(curString, 0f, 0f, 0, Config.bestiaryTextShadow)
+ mc.fontRendererObj.drawString(curString, 0f, 0f, 0, DulkirConfig.bestiaryTextShadow)
GlStateManager.popMatrix()
}
diff --git a/src/main/kotlin/dulkirmod/utils/Utils.kt b/src/main/kotlin/dulkirmod/utils/Utils.kt
index ce19b32..6340a6b 100644
--- a/src/main/kotlin/dulkirmod/utils/Utils.kt
+++ b/src/main/kotlin/dulkirmod/utils/Utils.kt
@@ -2,7 +2,7 @@ package dulkirmod.utils
import com.google.gson.Gson
import dulkirmod.DulkirMod.Companion.mc
-import dulkirmod.config.Config
+import dulkirmod.config.DulkirConfig
import net.minecraft.util.EnumChatFormatting
import java.awt.Toolkit
import java.awt.datatransfer.Clipboard
@@ -33,17 +33,17 @@ object Utils {
try {
val jsonString = String(Base64.getDecoder().decode(base64))
val import = gson.fromJson(jsonString, ConfigData::class.java)
- Config.customSize = import.size
- Config.customSpeed = import.speed
- Config.doesScaleSwing = import.scaleSwing
- Config.customX = import.x
- Config.customY = import.y
- Config.customZ = import.z
- Config.customYaw = import.yaw
- Config.customPitch = import.pitch
- Config.customRoll = import.roll
- Config.drinkingSelector = import.drinkingFix
- Config.ignoreHaste = import.ignoreHaste
+ DulkirConfig.customSize = import.size
+ DulkirConfig.customSpeed = import.speed
+ DulkirConfig.doesScaleSwing = import.scaleSwing
+ DulkirConfig.customX = import.x
+ DulkirConfig.customY = import.y
+ DulkirConfig.customZ = import.z
+ DulkirConfig.customYaw = import.yaw
+ DulkirConfig.customPitch = import.pitch
+ DulkirConfig.customRoll = import.roll
+ DulkirConfig.drinkingSelector = import.drinkingFix
+ DulkirConfig.ignoreHaste = import.ignoreHaste
} catch (e: Exception) {
TextUtils.info("§6§lCurrent clipboard is not a recognizable Custom Animation Preset.")
}