From 377e009eb22a72aa904e4a927e8f6b5c92815e69 Mon Sep 17 00:00:00 2001 From: makamys Date: Sat, 3 Feb 2024 02:21:26 +0100 Subject: OptiFine moment --- .../makamys/neodymium/renderer/NeoRenderer.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 3564c86..4fb80af 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -245,16 +245,17 @@ public class NeoRenderer { RenderGlobal rg = Minecraft.getMinecraft().renderGlobal; for(WorldRenderer wr : rg.sortedWorldRenderers) { - ++rg.renderersLoaded; - - if (wr.skipRenderPass[0]) { - ++rg.renderersSkippingRenderPass; - } else if (!wr.isInFrustum) { - ++rg.renderersBeingClipped; - } else if (rg.occlusionEnabled && !wr.isVisible) { - ++rg.renderersBeingOccluded; - } else { - ++rg.renderersBeingRendered; + if(wr != null) { + ++rg.renderersLoaded; + if (wr.skipRenderPass[0]) { + ++rg.renderersSkippingRenderPass; + } else if (!wr.isInFrustum) { + ++rg.renderersBeingClipped; + } else if (rg.occlusionEnabled && !wr.isVisible) { + ++rg.renderersBeingOccluded; + } else { + ++rg.renderersBeingRendered; + } } } } -- cgit