aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/Huds
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-04-07 18:40:31 -0500
committeringlettronald <inglettronald@gmail.com>2023-04-07 18:40:31 -0500
commite933913ebe88f6b465ee862374bbd26c57906cae (patch)
treeffe446d296da81ce545bb9833e11194fae832985 /src/main/kotlin/dulkirmod/Huds
parent08848974d8ea83d692ce1c215fd0d4f30bf72ab5 (diff)
downloadDulkirMod-e933913ebe88f6b465ee862374bbd26c57906cae.tar.gz
DulkirMod-e933913ebe88f6b465ee862374bbd26c57906cae.tar.bz2
DulkirMod-e933913ebe88f6b465ee862374bbd26c57906cae.zip
i don't even remember
Diffstat (limited to 'src/main/kotlin/dulkirmod/Huds')
-rw-r--r--src/main/kotlin/dulkirmod/Huds/GardenInfoHud.kt28
-rw-r--r--src/main/kotlin/dulkirmod/Huds/KeyHud.kt16
-rw-r--r--src/main/kotlin/dulkirmod/Huds/YawDisplayHud.kt29
3 files changed, 73 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/Huds/GardenInfoHud.kt b/src/main/kotlin/dulkirmod/Huds/GardenInfoHud.kt
new file mode 100644
index 0000000..f4d1afb
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/Huds/GardenInfoHud.kt
@@ -0,0 +1,28 @@
+package dulkirmod.Huds
+
+import cc.polyfrost.oneconfig.hud.TextHud
+import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.Utils
+
+class GardenInfoHud : TextHud(true) {
+ override fun getLines(lines: MutableList<String>?, example: Boolean) {
+ if (!Utils.isInSkyblock()) return
+ if (TabListUtils.area != "Garden") return
+ var i = 0
+ if (DulkirConfig.gardenMilestoneDisplay) {
+ lines?.add(i, TabListUtils.gardenMilestone)
+ ++i
+ }
+ if (DulkirConfig.visitorInfo) {
+ lines?.add(i, "Visitors: ${TabListUtils.numVisitors} - ${TabListUtils.timeTillNextVisitor}")
+ ++i
+ }
+ if (DulkirConfig.composterAlert) {
+ if (TabListUtils.emptyComposter) {
+ lines?.add(i, "Empty Composter!")
+ ++i
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/Huds/KeyHud.kt b/src/main/kotlin/dulkirmod/Huds/KeyHud.kt
new file mode 100644
index 0000000..5b0c1df
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/Huds/KeyHud.kt
@@ -0,0 +1,16 @@
+package dulkirmod.Huds
+import cc.polyfrost.oneconfig.hud.TextHud
+import dulkirmod.features.chat.DungeonKeyDisplay
+
+
+class KeyHud : TextHud(true) {
+
+ override fun getLines(lines: MutableList<String>?, 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/Huds/YawDisplayHud.kt b/src/main/kotlin/dulkirmod/Huds/YawDisplayHud.kt
new file mode 100644
index 0000000..610ee08
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/Huds/YawDisplayHud.kt
@@ -0,0 +1,29 @@
+package dulkirmod.Huds
+
+import cc.polyfrost.oneconfig.hud.TextHud
+import dulkirmod.DulkirMod.Companion.mc
+import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.Utils
+
+class YawDisplayHud : TextHud(true) {
+ override fun getLines(lines: MutableList<String>?, example: Boolean) {
+ if (!Utils.isInSkyblock()) return
+ if (TabListUtils.area != "Garden") return
+ val pitch = mc.thePlayer.rotationPitch
+ var yaw = mc.thePlayer.rotationYaw % 360f
+
+ if (yaw < -180.0f) {
+ yaw += 360.0f;
+ } else if (yaw > 180.0f) {
+ yaw -= 360.0f;
+ }
+ if (DulkirConfig.yaw3Decimals) {
+ lines?.add(0, String.format("Yaw: %.3f", yaw))
+ } else {
+ lines?.add(0, String.format("Yaw: %.2f", yaw))
+ }
+ if (DulkirConfig.showPitch)
+ lines?.add(1, String.format("Pitch: %.2f", pitch))
+ }
+} \ No newline at end of file