diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-06-16 11:38:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-16 11:38:25 +0200 |
commit | 8a4bf42e75c5405a7cb096adf1135ce415fd0f5a (patch) | |
tree | ed07ee192f28ebd55e2cadf9909c6a52f379f88a /src/main | |
parent | 6365ecd0e0708adaf3a8c74dbfaec413d34c173b (diff) | |
download | skyhanni-8a4bf42e75c5405a7cb096adf1135ce415fd0f5a.tar.gz skyhanni-8a4bf42e75c5405a7cb096adf1135ce415fd0f5a.tar.bz2 skyhanni-8a4bf42e75c5405a7cb096adf1135ce415fd0f5a.zip |
Fix: Dynamic Text being hidden after 80 blocks (#2103)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt b/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt index 318486440..0e4f36d32 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt @@ -152,6 +152,7 @@ object GraphEditor { smallestDistanceVew = 12.0, ignoreY = true, yOff = -15f, + maxDistance = 80, ) } 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) |