aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 7cb382d42..89489518c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -209,7 +209,7 @@ object RenderUtils {
z: Double,
rgb: Int,
alphaMultiplier: Float,
- partialTicks: Float
+ partialTicks: Float,
) {
val height = 300
val bottomOffset = 0
@@ -1009,6 +1009,7 @@ object RenderUtils {
smallestDistanceVew: Double = 5.0,
ignoreBlocks: Boolean = true,
ignoreY: Boolean = false,
+ maxDistance: Int? = null,
) {
val thePlayer = Minecraft.getMinecraft().thePlayer
val x = location.x
@@ -1030,7 +1031,9 @@ object RenderUtils {
distToPlayer = distToPlayer.coerceAtLeast(smallestDistanceVew)
if (distToPlayer < hideTooCloseAt) return
- if (ignoreBlocks && distToPlayer > 80) return
+ maxDistance?.let {
+ if (ignoreBlocks && distToPlayer > it) return
+ }
val distRender = distToPlayer.coerceAtMost(50.0)