aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-30 01:34:18 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-30 01:34:18 -0500
commit8c4b3ea33729823c9cf6b2193788698d6d1628b9 (patch)
tree420320752806f5690046c4fdfcf82b1d4e0f5844 /src/main
parentef1eac4f891c16e169c3a79eabc02a9e94fc55d2 (diff)
downloadDulkirMod-8c4b3ea33729823c9cf6b2193788698d6d1628b9.tar.gz
DulkirMod-8c4b3ea33729823c9cf6b2193788698d6d1628b9.tar.bz2
DulkirMod-8c4b3ea33729823c9cf6b2193788698d6d1628b9.zip
Patch Coordinates and area checks issues
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/dulkirmod/features/rift/EffigyWaypoint.kt25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/main/kotlin/dulkirmod/features/rift/EffigyWaypoint.kt b/src/main/kotlin/dulkirmod/features/rift/EffigyWaypoint.kt
index 73155eb..6a4b368 100644
--- a/src/main/kotlin/dulkirmod/features/rift/EffigyWaypoint.kt
+++ b/src/main/kotlin/dulkirmod/features/rift/EffigyWaypoint.kt
@@ -2,7 +2,10 @@ package dulkirmod.features.rift
import dulkirmod.DulkirMod.Companion.mc
import dulkirmod.config.DulkirConfig
-import dulkirmod.utils.*
+import dulkirmod.utils.ScoreBoardUtils
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.Utils
+import dulkirmod.utils.WorldRenderUtils
import net.minecraft.util.Vec3
import net.minecraftforge.client.event.RenderWorldLastEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -13,9 +16,9 @@ object EffigyWaypoint {
Effigy(Vec3(150.5, 76.0, 95.5)),
Effigy(Vec3(193.5, 90.0, 119.5)),
Effigy(Vec3(235.5, 107.0, 147.5)),
- Effigy(Vec3(294.5, 93.0, 134.5)),
- Effigy(Vec3(240.5, 126.0, 118.5)),
- Effigy(Vec3(262.5, 96.0, 94.5))
+ Effigy(Vec3(293.5, 93.0, 134.5)),
+ Effigy(Vec3(262.5, 96.0, 94.5)),
+ Effigy(Vec3(240.5, 126.0, 118.5))
)
private val c7OnlyRegex = Regex("[^c7]")
@@ -39,17 +42,15 @@ object EffigyWaypoint {
fun checkEffigies() {
if (!DulkirConfig.effigyWaypoint) return
if (!Utils.isInSkyblock()) return
- if (TabListUtils.area != "The Rift") return
+ if (TabListUtils.area != "The Rift") {
+ effigyWaypoints.forEach { it.render = false }
+ return
+ }
val lines = ScoreBoardUtils.getLines()
if (lines.size <= 7) return
- if (lines[3] != " §5ф §cStillgore\uD83D\uDC0D§c Château") return
+ if (!lines[3].contains("Stillgore")) return
val effigyStatusLine = lines[6].replace(c7OnlyRegex, "")
- if (effigyStatusLine.length != 6) {
- TextUtils.info("§6Something went wrong with Scoreboard parsing in Effigy Feature.")
- TextUtils.info(" §6Turning off feature, please report to Dulkir.", prefix = false)
- DulkirConfig.effigyWaypoint = false
- return
- }
+ if (effigyStatusLine.length != 6) return
for (i in 0..5) {
effigyWaypoints[i].render = (effigyStatusLine[i] == '7')
}