Skip to content

Commit

Permalink
We don't show the fps counter when the chat is open
Browse files Browse the repository at this point in the history
  • Loading branch information
OldSerpskiStalker committed Jan 7, 2025
1 parent 3551925 commit 22e780f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ public OnEventRenderFPS()
@SubscribeEvent
public static void onRenderGameOverlay_0(RenderGameOverlayEvent.Text event)
{
ScaledResolution scaled = new ScaledResolution(UniqueField.CLIENT);
if (!(UniqueField.CLIENT.currentScreen instanceof net.minecraft.client.gui.GuiChat))
{
ScaledResolution scaled = new ScaledResolution(UniqueField.CLIENT);

UniqueField.CLIENT.fontRenderer.drawString("FPS: " + Minecraft.getDebugFPS(),
2, scaled.getScaledHeight() - 10, 0x80FFFFFF);
UniqueField.CLIENT.fontRenderer.drawString("FPS: " + Minecraft.getDebugFPS(),
2, scaled.getScaledHeight() - 10, 0x80FFFFFF);
}
}
}

0 comments on commit 22e780f

Please sign in to comment.