From fcd6b68d60f4a3fa50991e75d101497aeca3aa4f Mon Sep 17 00:00:00 2001 From: makamys Date: Sun, 9 May 2021 07:17:49 +0200 Subject: Revert "Don't save the model of chunks on the edge of the loaded world" This is not needed anymore --- .../java/makamys/lodmod/renderer/LODRenderer.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index 51d0519..37a4661 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -409,23 +409,8 @@ public class LODRenderer { } public void onWorldRendererPost(WorldRenderer wr) { - int x = Math.floorDiv(wr.posX, 16); - int z = Math.floorDiv(wr.posZ, 16); - LODChunk lodChunk = getLODChunk(x, z); - if(areSurroundingChunksLoaded(x, z, wr.worldObj)) { - lodChunk.putChunkMeshes(Math.floorDiv(wr.posY, 16), ((IWorldRenderer)wr).getChunkMeshes()); - } - } - - public boolean areSurroundingChunksLoaded(int x, int z, World world) { - for(int dx = -1; dx <= 1; dx++) { - for(int dz = -1; dz <= 1; dz++) { - if(!world.getChunkFromChunkCoords(x + dx, z + dz).isChunkLoaded) { - return false; - } - } - } - return true; + LODChunk lodChunk = getLODChunk(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16)); + lodChunk.putChunkMeshes(Math.floorDiv(wr.posY, 16), ((IWorldRenderer)wr).getChunkMeshes()); } public void onWorldRendererRender(WorldRenderer wr) { -- cgit