aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2024-02-03 02:21:26 +0100
committermakamys <makamys@outlook.com>2024-02-03 02:54:19 +0100
commit377e009eb22a72aa904e4a927e8f6b5c92815e69 (patch)
treec3afa00f1d8296b72eb7fa176023f7e5560383f4 /src
parent2c0e73c7e3b510a4a51774958207e9c7094d6438 (diff)
downloadNeodymium-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.java21
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;
+ }
}
}
}