From 7467259b28471b46a5dd3571fa4a2329abe5fe4f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 12 Jul 2023 13:46:30 +0200 Subject: Removed Living Metal Highlighter correctly after couple seconds No longer show Living Metal Highlighter behind blocks when far away --- .../features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt index 3f5b7e01f..032ce3746 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt @@ -59,13 +59,15 @@ class LivingCaveLivingMetalHelper { fun onRenderWorld(event: RenderWorldLastEvent) { if (!isEnabled()) return val (a, b) = pair ?: return + if (System.currentTimeMillis() > startTime + 5_000) return + val maxTime = 500 val diff = startTime + maxTime - System.currentTimeMillis() val location = if (diff > 0) { val percentage = diff.toDouble() / maxTime a.slope(b, 1 - percentage) } else b - event.drawWaypointFilled(location, LorenzColor.AQUA.toColor(), seeThroughBlocks = true) + event.drawWaypointFilled(location, LorenzColor.AQUA.toColor(), seeThroughBlocks = location.distanceToPlayer() < 10) } @SubscribeEvent -- cgit