From c7dbc28a9a10c07686af65d853ea229554e42878 Mon Sep 17 00:00:00 2001 From: cola98765 Date: Wed, 13 Oct 2021 12:08:47 +0200 Subject: [PATCH] cleaned out some code --- .../bufferBuilding/lodTemplates/Box.java | 14 +--- .../com/seibel/lod/enums/FogDistance.java | 2 +- .../com/seibel/lod/enums/FogDrawOverride.java | 2 +- .../java/com/seibel/lod/enums/FogQuality.java | 2 +- .../seibel/lod/enums/GenerationPriority.java | 2 +- .../lod/enums/HorizontalResolution.java | 2 +- .../com/seibel/lod/enums/LodTemplate.java | 2 +- .../com/seibel/lod/enums/ShadingMode.java | 2 +- .../com/seibel/lod/proxy/ClientProxy.java | 7 +- .../com/seibel/lod/util/DataPointUtil.java | 65 ------------------- 10 files changed, 10 insertions(+), 90 deletions(-) diff --git a/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java b/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java index 6639a7074..4bc4eadd6 100644 --- a/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java +++ b/src/main/java/com/seibel/lod/builders/bufferBuilding/lodTemplates/Box.java @@ -398,12 +398,7 @@ public class Box } } - /** - * We use this method to set the various width of the column - * @param xWidth - * @param yWidth - * @param zWidth - */ + /** We use this method to set the various width of the column */ public void setWidth(int xWidth, int yWidth, int zWidth) { boxWidth[X] = xWidth; @@ -411,12 +406,7 @@ public class Box boxWidth[Z] = zWidth; } - /** - * We use this method to set the various offset of the column - * @param xOffset - * @param yOffset - * @param zOffset - */ + /** We use this method to set the various offset of the column */ public void setOffset(int xOffset, int yOffset, int zOffset) { boxOffset[X] = xOffset; diff --git a/src/main/java/com/seibel/lod/enums/FogDistance.java b/src/main/java/com/seibel/lod/enums/FogDistance.java index 25b697997..96baf7b72 100644 --- a/src/main/java/com/seibel/lod/enums/FogDistance.java +++ b/src/main/java/com/seibel/lod/enums/FogDistance.java @@ -32,5 +32,5 @@ public enum FogDistance FAR, /** only looks good if the fog quality is set to Fancy. */ - NEAR_AND_FAR; + NEAR_AND_FAR } \ No newline at end of file diff --git a/src/main/java/com/seibel/lod/enums/FogDrawOverride.java b/src/main/java/com/seibel/lod/enums/FogDrawOverride.java index 8199e85fc..405311f42 100644 --- a/src/main/java/com/seibel/lod/enums/FogDrawOverride.java +++ b/src/main/java/com/seibel/lod/enums/FogDrawOverride.java @@ -39,5 +39,5 @@ public enum FogDrawOverride ALWAYS_DRAW_FOG_FAST, /** Always draw fog on the LODs */ - ALWAYS_DRAW_FOG_FANCY; + ALWAYS_DRAW_FOG_FANCY } \ No newline at end of file diff --git a/src/main/java/com/seibel/lod/enums/FogQuality.java b/src/main/java/com/seibel/lod/enums/FogQuality.java index ec2bf69a8..641117066 100644 --- a/src/main/java/com/seibel/lod/enums/FogQuality.java +++ b/src/main/java/com/seibel/lod/enums/FogQuality.java @@ -27,5 +27,5 @@ public enum FogQuality { FAST, FANCY, - OFF; + OFF } diff --git a/src/main/java/com/seibel/lod/enums/GenerationPriority.java b/src/main/java/com/seibel/lod/enums/GenerationPriority.java index 2e5b0a0fc..4968c5037 100644 --- a/src/main/java/com/seibel/lod/enums/GenerationPriority.java +++ b/src/main/java/com/seibel/lod/enums/GenerationPriority.java @@ -31,5 +31,5 @@ public enum GenerationPriority { NEAR_FIRST, - FAR_FIRST; + FAR_FIRST } diff --git a/src/main/java/com/seibel/lod/enums/HorizontalResolution.java b/src/main/java/com/seibel/lod/enums/HorizontalResolution.java index 8382993cf..e1bb023dc 100644 --- a/src/main/java/com/seibel/lod/enums/HorizontalResolution.java +++ b/src/main/java/com/seibel/lod/enums/HorizontalResolution.java @@ -80,7 +80,7 @@ public enum HorizontalResolution - private HorizontalResolution(int newLengthCount, int newDetailLevel) + HorizontalResolution(int newLengthCount, int newDetailLevel) { detailLevel = (byte) newDetailLevel; dataPointLengthCount = newLengthCount; diff --git a/src/main/java/com/seibel/lod/enums/LodTemplate.java b/src/main/java/com/seibel/lod/enums/LodTemplate.java index f62a0ddff..e82758d4a 100644 --- a/src/main/java/com/seibel/lod/enums/LodTemplate.java +++ b/src/main/java/com/seibel/lod/enums/LodTemplate.java @@ -46,7 +46,7 @@ public enum LodTemplate public final AbstractLodTemplate template; - private LodTemplate(AbstractLodTemplate newTemplate) + LodTemplate(AbstractLodTemplate newTemplate) { template = newTemplate; } diff --git a/src/main/java/com/seibel/lod/enums/ShadingMode.java b/src/main/java/com/seibel/lod/enums/ShadingMode.java index f6dc94791..17fce842f 100644 --- a/src/main/java/com/seibel/lod/enums/ShadingMode.java +++ b/src/main/java/com/seibel/lod/enums/ShadingMode.java @@ -18,5 +18,5 @@ public enum ShadingMode * LODs will have darker sides and bottoms to simulate * Minecraft's fast, top down lighting. */ - GAME_SHADING; + GAME_SHADING } \ No newline at end of file diff --git a/src/main/java/com/seibel/lod/proxy/ClientProxy.java b/src/main/java/com/seibel/lod/proxy/ClientProxy.java index 9ac7188eb..d4728ee01 100644 --- a/src/main/java/com/seibel/lod/proxy/ClientProxy.java +++ b/src/main/java/com/seibel/lod/proxy/ClientProxy.java @@ -97,12 +97,7 @@ public class ClientProxy // render event // //==============// - /** - * Do any setup that is required to draw LODs - * and then tell the LodRenderer to draw. - * - * @param mcMatrixStack - */ + /** Do any setup that is required to draw LODs and then tell the LodRenderer to draw. */ public void renderLods(MatrixStack mcMatrixStack, float partialTicks) { // comment out when creating a release diff --git a/src/main/java/com/seibel/lod/util/DataPointUtil.java b/src/main/java/com/seibel/lod/util/DataPointUtil.java index c0d360736..d474306b7 100644 --- a/src/main/java/com/seibel/lod/util/DataPointUtil.java +++ b/src/main/java/com/seibel/lod/util/DataPointUtil.java @@ -202,71 +202,6 @@ public class DataPointUtil isVoid(dataPoint) + " " + doesItExist(dataPoint) + '\n'; } - - /** - * This method merge column of single data together - * @deprecated - */ - public static long mergeSingleData(long[] dataToMerge) - { - int numberOfChildren = 0; - - int tempAlpha = 0; - int tempRed = 0; - int tempGreen = 0; - int tempBlue = 0; - int tempHeight = Integer.MIN_VALUE; - int tempDepth = Integer.MAX_VALUE; - int tempLightBlock = 0; - int tempLightSky = 0; - byte tempGenMode = DistanceGenerationMode.SERVER.complexity; - boolean allEmpty = true; - boolean allVoid = true; - for (long data : dataToMerge) - { - if (DataPointUtil.doesItExist(data)) - { - allEmpty = false; - if (!(DataPointUtil.isVoid(data))) - { - numberOfChildren++; - allVoid = false; - tempAlpha += DataPointUtil.getAlpha(data); - tempRed += DataPointUtil.getRed(data); - tempGreen += DataPointUtil.getGreen(data); - tempBlue += DataPointUtil.getBlue(data); - tempHeight = Math.max(tempHeight, DataPointUtil.getHeight(data)); - tempDepth = Math.min(tempDepth, DataPointUtil.getDepth(data)); - tempLightBlock += DataPointUtil.getLightBlock(data); - tempLightSky += DataPointUtil.getLightSky(data); - } - tempGenMode = (byte) Math.min(tempGenMode, DataPointUtil.getGenerationMode(data)); - } else - { - tempGenMode = (byte) Math.min(tempGenMode, DistanceGenerationMode.NONE.complexity); - } - } - - if (allEmpty) - { - //no child has been initialized - return DataPointUtil.EMPTY_DATA; - } else if (allVoid) - { - //all the children are void - return DataPointUtil.createVoidDataPoint(tempGenMode); - } else - { - //we have at least 1 child - tempAlpha = tempAlpha / numberOfChildren; - tempRed = tempRed / numberOfChildren; - tempGreen = tempGreen / numberOfChildren; - tempBlue = tempBlue / numberOfChildren; - tempLightBlock = tempLightBlock / numberOfChildren; - tempLightSky = tempLightSky / numberOfChildren; - return DataPointUtil.createDataPoint(tempAlpha, tempRed, tempGreen, tempBlue, tempHeight, tempDepth, tempLightSky, tempLightBlock, tempGenMode); - } - } public static void shrinkArray(short[] array, int packetSize, int start, int length, int arraySize) {