From e4ad69e2ca2ab8ece9c43053919c32dfd4ca69d1 Mon Sep 17 00:00:00 2001 From: ton185 <174216122+ton185@users.noreply.github.com> Date: Sun, 24 May 2026 21:38:08 +0100 Subject: [PATCH] Fix shader resizing method to use correct dimensions This also fixes a crash that happens when the window is minimized and you `loadShader` for the first time (occurs for example if you are waiting for chunks to load and tabbed out, then when the chunk loads it has a block that calls loadShader and you crash) --- .../content/blocks/render/RuneEnergyPylonRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/finderfeed/solarcraft/content/blocks/render/RuneEnergyPylonRenderer.java b/src/main/java/com/finderfeed/solarcraft/content/blocks/render/RuneEnergyPylonRenderer.java index 7fcbc82e..40732770 100644 --- a/src/main/java/com/finderfeed/solarcraft/content/blocks/render/RuneEnergyPylonRenderer.java +++ b/src/main/java/com/finderfeed/solarcraft/content/blocks/render/RuneEnergyPylonRenderer.java @@ -128,7 +128,7 @@ private void loadShader(BlockEntity tile,ResourceLocation LOC, UniformPlusPlus u if (SHADER == null){ try { SHADER = new PostChainPlusUltra(LOC,uniforms); - SHADER.resize(Minecraft.getInstance().getWindow().getScreenWidth(),Minecraft.getInstance().getWindow().getScreenHeight()); + SHADER.resize(Minecraft.getInstance().getWindow().getWidth(),Minecraft.getInstance().getWindow().getHeight()); RenderingTools.addActivePostShader(tile.toString(),uniforms,SHADER); }catch (Exception e){ e.printStackTrace();