aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/renderer/LODRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/LODRenderer.java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 2d08bfb..c3ae345 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -96,8 +96,10 @@ public class LODRenderer {
public boolean disableChunkMeshes = true;
public LODRenderer(World world){
- hasInited = init();
- this.world = world;
+ this.world = world;
+ if(shouldRenderInWorld(world)) {
+ hasInited = init();
+ }
}
public void preRenderSortedRenderers(int renderPass, double alpha, WorldRenderer[] sortedWorldRenderers) {
@@ -663,6 +665,10 @@ public class LODRenderer {
return Minecraft.getMinecraft().mcDataDir.toPath().resolve("lodmod").resolve(Minecraft.getMinecraft().getIntegratedServer().getFolderName());
}
+ private boolean shouldRenderInWorld(World world) {
+ return world != null && !world.provider.isHellWorld;
+ }
+
public static class LODChunkComparator implements Comparator<LODChunk> {
Entity player;