Skip to content

Commit

Permalink
Hack coloring of text color
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Sep 16, 2023
1 parent 5ffb771 commit 3fadf41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/cam72cam/mod/gui/helpers/GUIHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import org.lwjgl.opengl.GL11;
Expand Down Expand Up @@ -116,6 +117,7 @@ public static void drawCenteredString(String text, int x, int y, int color, Matr
RenderState state = new RenderState().color(1, 1, 1, 1).alpha_test(true);
state.model_view().multiply(matrix);
try (With ctx = RenderContext.apply(state)) {
GlStateManager.color(1, 1, 1, 0);
Minecraft.getMinecraft().fontRenderer.drawString(text, x - Minecraft.getMinecraft().fontRenderer.getStringWidth(text) / 2, y, color);
}
}
Expand Down

0 comments on commit 3fadf41

Please sign in to comment.