mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix "overlayMessage" rendering in ForgeIngameGui being different than vanilla (#6748)
This commit is contained in:
1 parent
28f7b5d885
commit
5dbea9ea8d
2 files changed
+5
-3
No files matched your search
@@ -675,17 +675,18 @@ public class ForgeIngameGui extends IngameGui
|
||||
{
|
||||
mc.getProfiler().startSection("overlayMessage");
|
||||
float hue = (float)overlayMessageTime - partialTicks;
|
||||
int opacity = (int)(hue * 256.0F / 20.0F);
|
||||
int opacity = (int)(hue * 255.0F / 20.0F);
|
||||
if (opacity > 255) opacity = 255;
|
||||
|
||||
if (opacity > 0)
|
||||
if (opacity > 8)
|
||||
{
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.translatef((float)(width / 2), (float)(height - 68), 0.0F);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
int color = (animateOverlayMessageColor ? MathHelper.hsvToRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
||||
fontrenderer.drawStringWithShadow(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
|
||||
renderTextBackground(fontrenderer, -4, fontrenderer.getStringWidth(overlayMessage));
|
||||
fontrenderer.drawString(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user