diff options
author | makamys <makamys@outlook.com> | 2024-02-03 02:21:26 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2024-02-03 02:54:19 +0100 |
commit | 377e009eb22a72aa904e4a927e8f6b5c92815e69 (patch) | |
tree | c3afa00f1d8296b72eb7fa176023f7e5560383f4 /src | |
parent | 2c0e73c7e3b510a4a51774958207e9c7094d6438 (diff) | |
download | Neodymium-377e009eb22a72aa904e4a927e8f6b5c92815e69.tar.gz Neodymium-377e009eb22a72aa904e4a927e8f6b5c92815e69.tar.bz2 Neodymium-377e009eb22a72aa904e4a927e8f6b5c92815e69.zip |
OptiFine moment
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 21 |
1 files changed, 11 insertions, 10 deletions
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; + } } } } |