aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-03-04 13:20:20 -0500
committerbowser0000 <bowser0000@gmail.com>2022-03-04 13:20:20 -0500
commit2b57ccad6d21b325c3164117fe14e00e13399a7c (patch)
treeba0d560ed179fa3eb412996ac55ea3c920c2d88d /src/main/java/me/Danker/utils
parent42b556c49db4d848cddca76b383135dcdaad99fa (diff)
downloadSkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.tar.gz
SkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.tar.bz2
SkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.zip
Add CH fishing tracker
Organized change display GUI Add method to make centered text rendering easier
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/RenderUtils.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/RenderUtils.java b/src/main/java/me/Danker/utils/RenderUtils.java
index f117969..50b9786 100644
--- a/src/main/java/me/Danker/utils/RenderUtils.java
+++ b/src/main/java/me/Danker/utils/RenderUtils.java
@@ -363,4 +363,10 @@ public class RenderUtils {
GlStateManager.disableRescaleNormal();
}
+ public static void drawCenteredText(String text, int screenWidth, int height, double scale) {
+ Minecraft mc = Minecraft.getMinecraft();
+ int textWidth = mc.fontRendererObj.getStringWidth(text);
+ new TextRenderer(mc, text, screenWidth / 2 - textWidth / 2, height, scale);
+ }
+
}