From 9a06904634314a9a582ad70f00f3ab28973f24ea Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 23 Nov 2024 09:31:04 +0000 Subject: [PATCH 1/2] 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. --- .../client/render/monitor/MonitorBlockEntityRenderer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java b/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java index 43ca16ac7..f539227c4 100644 --- a/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java +++ b/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java @@ -209,9 +209,9 @@ private static void renderTerminal( 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 From 1963e0160f1fea472e5245ae5336061fb298d0d3 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 23 Nov 2024 09:34:03 +0000 Subject: [PATCH 2/2] Bump CC:T to 1.114.2 Ahhhh, I hate graphics code. --- gradle.properties | 2 +- .../data/computercraft/lua/rom/help/changelog.md | 5 +++++ .../resources/data/computercraft/lua/rom/help/whatsnew.md | 8 +++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index 66bb787d8..6285bdff7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ kotlin.jvm.target.validation.mode=error # Mod properties isUnstable=false -modVersion=1.114.1 +modVersion=1.114.2 # Minecraft properties: We want to configure this here so we can read it in settings.gradle mcVersion=1.20.1 diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md index 9fd71be6e..bdffb0836 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md @@ -1,3 +1,8 @@ +# New features in CC: Tweaked 1.114.2 + +One bug fix: +* Fix OpenGL errors when rendering empty monitors. + # New features in CC: Tweaked 1.114.1 Several bug fixes: diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md index 389dfaa36..203143367 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md @@ -1,8 +1,6 @@ -New features in CC: Tweaked 1.114.1 +New features in CC: Tweaked 1.114.2 -Several bug fixes: -* Fix monitor touch events only firing from one monitor. -* Fix crash when lectern has no item. -* Fix cursor not blinking on monitors. +One bug fix: +* Fix OpenGL errors when rendering empty monitors. Type "help changelog" to see the full version history.