aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 01:22:50 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 01:22:50 +0100
commitabd2c854bf10206b2e718364430281be6b7fefdd (patch)
treed8afaf1d65ed1efbd9d42fe8c5d6d8170c57ffb8 /src/main/java/at/hannibal2
parent13fae8fb00cca71a3eb6f4f02aab46db7f0bc7b2 (diff)
downloadskyhanni-abd2c854bf10206b2e718364430281be6b7fefdd.tar.gz
skyhanni-abd2c854bf10206b2e718364430281be6b7fefdd.tar.bz2
skyhanni-abd2c854bf10206b2e718364430281be6b7fefdd.zip
Don't render overlays when tab list key is pressed.
Diffstat (limited to 'src/main/java/at/hannibal2')
-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 3f8f1ce68..3697838c7 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -425,14 +425,17 @@ object RenderUtils {
}
fun Position.renderString(string: String?, offsetY: Int = 0) {
+ val minecraft = Minecraft.getMinecraft()
+ if (minecraft.gameSettings.keyBindPlayerList.isKeyDown) return
+
if (string == null) return
if (string == "") return
val textToRender = "§f$string"
GlStateManager.pushMatrix()
- val resolution = ScaledResolution(Minecraft.getMinecraft())
+ val resolution = ScaledResolution(minecraft)
- val renderer = Minecraft.getMinecraft().renderManager.fontRenderer ?: return
+ val renderer = minecraft.renderManager.fontRenderer ?: return
val offsetX = (200 - renderer.getStringWidth(textToRender.removeColor())) / 2