aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
index f7b21476c..62b914f7d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
@@ -26,6 +26,7 @@ class GriffinBurrowHelper {
private var lastDug: LorenzVec? = null
private var teleportedLocation: LorenzVec? = null
private var lastGuessTime = 0L
+ private var lastAnimationTime = 0L
@SubscribeEvent
fun onSoopyGuessBurrow(event: SoopyGuessBurrowEvent) {
@@ -135,7 +136,7 @@ class GriffinBurrowHelper {
val distance = location.distance(playerLocation)
val burrowType = burrow.value
// if (distance < 30) {
- event.drawColor(location, burrowType.color, distance > 10)
+ event.drawColor(location, burrowType.color, distance > 10)
// }
event.drawDynamicText(location.add(0, 1, 0), burrowType.text, 1.5)
// if (distance < 10) {
@@ -151,7 +152,7 @@ class GriffinBurrowHelper {
event.drawColor(guessLocation, LorenzColor.WHITE, distance > 10)
event.drawDynamicText(guessLocation.add(0, 1, 0), "Guess", 1.5)
if (distance > 5) {
- val formattedDistance = LorenzUtils.formatDouble(distance)
+ val formattedDistance = LorenzUtils.formatInteger(distance.toInt())
event.drawDynamicText(guessLocation.add(0, 1, 0), "§e${formattedDistance}m", 1.7, yOff = 10f)
}
}
@@ -211,8 +212,13 @@ class GriffinBurrowHelper {
event.draw3DLine(animation.add(0.5, 0.5, 0.5), target.add(0.5, 0.5, 0.5), LorenzColor.WHITE.toColor(), 2, true)
- vector = vector.multiply(1 / vector.length())
- vector = vector.multiply(0.18)
- return animation.add(vector)
+ return if (System.currentTimeMillis() > lastAnimationTime + 25) {
+ lastAnimationTime = System.currentTimeMillis()
+ vector = vector.multiply(1 / vector.length())
+ vector = vector.multiply(0.18)
+ animation.add(vector)
+ } else {
+ animation
+ }
}
} \ No newline at end of file