diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-12 13:46:30 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-12 13:46:30 +0200 |
commit | 7467259b28471b46a5dd3571fa4a2329abe5fe4f (patch) | |
tree | a4929f06d42cac6a3a4995a137ba8d7d23fc52dc | |
parent | 32a18dbb83d2c676406491d9439609fe3369b276 (diff) | |
download | skyhanni-7467259b28471b46a5dd3571fa4a2329abe5fe4f.tar.gz skyhanni-7467259b28471b46a5dd3571fa4a2329abe5fe4f.tar.bz2 skyhanni-7467259b28471b46a5dd3571fa4a2329abe5fe4f.zip |
Removed Living Metal Highlighter correctly after couple seconds
No longer show Living Metal Highlighter behind blocks when far away
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt | 4 |
1 files changed, 3 insertions, 1 deletions
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 |