aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
authormartimavocado <39881008+martimavocado@users.noreply.github.com>2024-10-05 09:07:15 +0000
committerGitHub <noreply@github.com>2024-10-05 11:07:15 +0200
commitb3cb37f5459afce7c6234b5ab3a8891447eb587a (patch)
treef5c7ca7326c11e2b55e46b85ed3ef3d17063df52 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
parent2db5f13d4f5e7f004006c438dbf5a7f20b34e084 (diff)
downloadskyhanni-b3cb37f5459afce7c6234b5ab3a8891447eb587a.tar.gz
skyhanni-b3cb37f5459afce7c6234b5ab3a8891447eb587a.tar.bz2
skyhanni-b3cb37f5459afce7c6234b5ab3a8891447eb587a.zip
Improvement: Make visitor GUI clickable to tp to barn (#2658)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index cf2339bf3..309f17f68 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -591,10 +591,11 @@ object RenderUtils {
}
fun Position.renderRenderable(
- renderable: Renderable,
+ renderable: Renderable?,
posLabel: String,
addToGuiManager: Boolean = true,
) {
+ if (renderable == null) return
GlStateManager.pushMatrix()
val (x, y) = transform()
Renderable.withMousePosition(x, y) {