diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-26 20:03:28 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-26 20:03:28 +0100 |
commit | 146f3cace9a0265a720e0d80555456eb6ba821fe (patch) | |
tree | efda5e46d7d771066d4b362f1ff3e88b82f80ac8 /src/main | |
parent | 45837469817266951b72cea054430c19c0fc7126 (diff) | |
download | skyhanni-146f3cace9a0265a720e0d80555456eb6ba821fe.tar.gz skyhanni-146f3cace9a0265a720e0d80555456eb6ba821fe.tar.bz2 skyhanni-146f3cace9a0265a720e0d80555456eb6ba821fe.zip |
Showing burrow guess point more clearly with distance
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt | 37 |
1 files changed, 20 insertions, 17 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 a446dca17..f7b21476c 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 @@ -58,7 +58,7 @@ class GriffinBurrowHelper { private fun checkRemoveGuess(animation: Boolean) { guessLocation?.let { guessRaw -> val guess = findBlock(guessRaw) - if (particleBurrows.any { guess.distance(it.key) < 20 }) { + if (particleBurrows.any { guess.distance(it.key) < 40 }) { if (animation) { animationLocation = guess } @@ -126,30 +126,33 @@ class GriffinBurrowHelper { @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { + sendTip(event) + val playerLocation = LocationUtils.playerLocation() + if (SkyHanniMod.feature.diana.burrowsNearbyDetection) { + for (burrow in particleBurrows) { + val location = burrow.key + val distance = location.distance(playerLocation) + val burrowType = burrow.value +// if (distance < 30) { + event.drawColor(location, burrowType.color, distance > 10) +// } + event.drawDynamicText(location.add(0, 1, 0), burrowType.text, 1.5) +// if (distance < 10) { +// event.drawString(location.add(0.5, 1.5, 0.5), burrowType.text, true) +// } + } + } + if (SkyHanniMod.feature.diana.burrowsSoopyGuess) { guessLocation?.let { val guessLocation = findBlock(it) val distance = guessLocation.distance(playerLocation) event.drawColor(guessLocation, LorenzColor.WHITE, distance > 10) - event.drawDynamicText(guessLocation, "Guess", 1.5) + event.drawDynamicText(guessLocation.add(0, 1, 0), "Guess", 1.5) if (distance > 5) { val formattedDistance = LorenzUtils.formatDouble(distance) - event.drawDynamicText(guessLocation, "§e${formattedDistance}m", 1.3, yOff = 12f) - } - } - } - - sendTip(event) - - if (SkyHanniMod.feature.diana.burrowsNearbyDetection) { - for (burrow in particleBurrows) { - val location = burrow.key - val distance = location.distance(playerLocation) - val burrowType = burrow.value - event.drawColor(location, burrowType.color, distance > 10) - if (distance < 10) { - event.drawString(location.add(0.5, 1.5, 0.5), burrowType.text, true) + event.drawDynamicText(guessLocation.add(0, 1, 0), "§e${formattedDistance}m", 1.7, yOff = 10f) } } } |