diff options
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) |