diff --git a/src/main/java/com/seibel/lod/builders/LodBufferBuilder.java b/src/main/java/com/seibel/lod/builders/LodBufferBuilder.java index 28acdcca3..9d4314fcb 100644 --- a/src/main/java/com/seibel/lod/builders/LodBufferBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodBufferBuilder.java @@ -199,7 +199,6 @@ public class LodBufferBuilder // RENDERING PART // // =====================// - long renderRequestStart = System.currentTimeMillis(); for (int xRegion = 0; xRegion < lodDim.regions.length; xRegion++) { for (int zRegion = 0; zRegion < lodDim.regions.length; zRegion++) @@ -274,8 +273,6 @@ public class LodBufferBuilder }// region z }// region z - long renderRequestEnd = System.currentTimeMillis(); - long renderStart = System.currentTimeMillis(); // wait for all threads to finish List> futures = bufferBuilderThreads.invokeAll(builderThreads); @@ -331,7 +328,6 @@ public class LodBufferBuilder int requesting = maxChunkGenRequests; genReqStart = System.currentTimeMillis(); - /* //we firstly make sure that the world is filled with half region wide block for (byte detailGen = LodConfig.CLIENT.maxGenerationDetail.get().detailLevel; detailGen <= LodUtil.REGION_DETAIL_LEVEL; detailGen++) { @@ -351,8 +347,6 @@ public class LodBufferBuilder } - */ - //we then fill the world with the rest of the block for (byte detailGen = LodConfig.CLIENT.maxGenerationDetail.get().detailLevel; detailGen <= LodUtil.REGION_DETAIL_LEVEL; detailGen++) { @@ -483,7 +477,6 @@ public class LodBufferBuilder long treeTime = treeEnd - treeStart; - long renderingRequestTime = renderRequestEnd - renderRequestStart; long renderingTime = renderEnd - renderStart; @@ -493,7 +486,6 @@ public class LodBufferBuilder ClientProxy.LOGGER.info("Buffer Build time: " + buildTime + " ms" + '\n' + "Tree cutting time: " + treeTime + " ms" + '\n' + - "Rendering request time: " + renderingRequestTime + " ms" + '\n' + "Rendering time: " + renderingTime + " ms" + '\n' + "Generation request time: " + genReqTime + " ms" + '\n' + "Generation time: " + genTime + " ms"); diff --git a/src/main/java/com/seibel/lod/builders/LodBuilder.java b/src/main/java/com/seibel/lod/builders/LodBuilder.java index 41c30afaa..0164bc121 100644 --- a/src/main/java/com/seibel/lod/builders/LodBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodBuilder.java @@ -110,6 +110,7 @@ public class LodBuilder generateLodNodeFromChunk(lodDim, chunk, new LodBuilderConfig(generationMode), LodConfig.CLIENT.maxGenerationDetail.get()); } catch (IllegalArgumentException | NullPointerException e) { + System.out.println("Chunk pos " + chunk.getPos()); e.printStackTrace(); // if the world changes while LODs are being generated // they will throw errors as they try to access things that no longer diff --git a/src/main/java/com/seibel/lod/objects/LodDimension.java b/src/main/java/com/seibel/lod/objects/LodDimension.java index c9e6d0d24..ee06cf6b4 100644 --- a/src/main/java/com/seibel/lod/objects/LodDimension.java +++ b/src/main/java/com/seibel/lod/objects/LodDimension.java @@ -417,8 +417,8 @@ public class LodDimension region = getRegion(new LevelPos(LodUtil.REGION_DETAIL_LEVEL, regionPos.x, regionPos.z).convert(detailLevel)); if (region == null) { - region = new LodRegion(DetailUtil.getLodDetail(detailLevel).detailLevel, regionPos); - addOrOverwriteRegion(region); + //region = new LodRegion(DetailUtil.getLodDetail(detailLevel).detailLevel, regionPos); + //addOrOverwriteRegion(region); } else { listOfData.addAll(region.getDataToRender(playerPosX, playerPosZ, start, end, detailLevel)); @@ -439,6 +439,7 @@ public class LodDimension LodRegion region = getRegion(new LevelPos(LodUtil.REGION_DETAIL_LEVEL, regionPos.x, regionPos.z).convert(detailLevel)); if (region == null) { + /* try { region = new LodRegion(DetailUtil.getLodDetail(detailLevel).detailLevel, regionPos); @@ -449,6 +450,8 @@ public class LodDimension ClientProxy.LOGGER.warn("getDataToRender was unable to add the region at the pos [" + regionPos.x + ", " + regionPos.z + "]"); return listOfData; // this list should be empty } + */ + return listOfData; } else { diff --git a/src/main/java/com/seibel/lod/objects/LodRegion.java b/src/main/java/com/seibel/lod/objects/LodRegion.java index 1c3c66a93..35a0e2774 100644 --- a/src/main/java/com/seibel/lod/objects/LodRegion.java +++ b/src/main/java/com/seibel/lod/objects/LodRegion.java @@ -606,6 +606,7 @@ public class LodRegion implements Serializable { if(minDetailLevel < detailLevel) { + System.out.println("cutting at " + detailLevel); for (byte tempLod = 0; tempLod < detailLevel; tempLod++) { colors[tempLod] = new byte[0][0][0]; diff --git a/src/main/java/com/seibel/lod/proxy/ClientProxy.java b/src/main/java/com/seibel/lod/proxy/ClientProxy.java index af4772495..0f8a6d685 100644 --- a/src/main/java/com/seibel/lod/proxy/ClientProxy.java +++ b/src/main/java/com/seibel/lod/proxy/ClientProxy.java @@ -139,8 +139,8 @@ public class ClientProxy // LodConfig.CLIENT.drawLODs.set(true); LodConfig.CLIENT.debugMode.set(false); - LodConfig.CLIENT.maxDrawDetail.set(LodDetail.QUAD); - LodConfig.CLIENT.maxGenerationDetail.set(LodDetail.QUAD); + LodConfig.CLIENT.maxDrawDetail.set(LodDetail.SINGLE); + LodConfig.CLIENT.maxGenerationDetail.set(LodDetail.SINGLE); LodConfig.CLIENT.fogDistance.set(FogDistance.FAR); LodConfig.CLIENT.fogDrawOverride.set(FogDrawOverride.ALWAYS_DRAW_FOG_FANCY); @@ -150,7 +150,7 @@ public class ClientProxy LodConfig.CLIENT.distanceGenerationMode.set(DistanceGenerationMode.SURFACE); LodConfig.CLIENT.allowUnstableFeatureGeneration.set(false); - LodConfig.CLIENT.lodChunkRenderDistance.set(128); + LodConfig.CLIENT.lodChunkRenderDistance.set(512); LodConfig.CLIENT.lodDistanceCalculatorType.set(DistanceCalculatorType.LINEAR); LodConfig.CLIENT.lodQuality.set(1); LodConfig.CLIENT.allowUnstableFeatureGeneration.set(false); diff --git a/src/main/java/com/seibel/lod/util/LodUtil.java b/src/main/java/com/seibel/lod/util/LodUtil.java index 48e921772..4c8d2d65f 100644 --- a/src/main/java/com/seibel/lod/util/LodUtil.java +++ b/src/main/java/com/seibel/lod/util/LodUtil.java @@ -73,7 +73,9 @@ public class LodUtil public static final byte CHUNK_DETAIL_LEVEL = 4; /** 1 block wide */ public static final byte BLOCK_DETAIL_LEVEL = 0; - + + + public static final byte DETAIL_OPTIONS = 10; /** measured in Blocks
* detail level 9 */