aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-10 23:06:05 +0900
committersyeyoung <cyong06@naver.com>2021-03-10 23:06:05 +0900
commit92ce9024b73df31f3c88ad23a7443dec2578469c (patch)
treedd7f6c928c79e2847a34ccb47820a037d244e361 /src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
parenta7030786cc5f3b756f8b538f8f071cd7d5c14e77 (diff)
downloadSkyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.tar.gz
Skyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.tar.bz2
Skyblock-Dungeons-Guide-92ce9024b73df31f3c88ad23a7443dec2578469c.zip
finally fix gui flashing issue.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
index b20b2f33..d6fd8ab4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
@@ -6,6 +6,7 @@ import lombok.Data;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.GlStateManager;
import java.awt.*;
import java.util.ArrayList;
@@ -88,8 +89,9 @@ public class StyledTextRenderer {
if (stopDraw)
return new Dimension(fr.getStringWidth(content), fr.FONT_HEIGHT);
- Gui.drawRect(x,y, x+fr.getStringWidth(content), y + fr.FONT_HEIGHT, RenderUtils.getColorAt(x,y, style.getBackground()));
+ RenderUtils.drawRectSafe(x,y, x+fr.getStringWidth(content), y + fr.FONT_HEIGHT, RenderUtils.getColorAt(x,y, style.getBackground()));
+ GlStateManager.enableBlend();
if (!style.getColor().isChroma()) {
fr.drawString(content, x, y, style.getColor().getRGB(), style.isShadow());
return new Dimension(fr.getStringWidth(content), fr.FONT_HEIGHT);