From 8c4b3ea33729823c9cf6b2193788698d6d1628b9 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Fri, 30 Jun 2023 01:34:18 -0500 Subject: Patch Coordinates and area checks issues --- .../dulkirmod/features/rift/EffigyWaypoint.kt | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src') 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') } -- cgit