1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-05 11:57:56 +00:00

Only skip cursor if it exists

If the cursor is not visible then we'd end up blinking the last
character on the screen. And if the screen was empty we'd spew the logs
with GL errors.
This commit is contained in:
Jonathan Coates
2024-11-23 09:31:04 +00:00
parent 5e24ad17d7
commit 9a06904634

View File

@@ -209,9 +209,9 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer<MonitorBl
foregroundBuffer.drawWithShader(
matrix, RenderSystem.getProjectionMatrix(), RenderTypes.getTerminalShader(),
// Skip the cursor quad if it is not visible this frame.
FixedWidthFontRenderer.isCursorVisible(terminal) && FrameInfo.getGlobalCursorBlink()
? foregroundBuffer.getIndexCount()
: foregroundBuffer.getIndexCount() - RenderTypes.TERMINAL.mode().indexCount(4)
FixedWidthFontRenderer.isCursorVisible(terminal) && !FrameInfo.getGlobalCursorBlink()
? foregroundBuffer.getIndexCount() - RenderTypes.TERMINAL.mode().indexCount(4)
: foregroundBuffer.getIndexCount()
);
// Clear state