From 29ed26f0236872915bc34a3d7173a6f758349c0b Mon Sep 17 00:00:00 2001 From: cola98765 Date: Mon, 20 Sep 2021 13:31:16 +0200 Subject: [PATCH] More warnings addressed --- .../java/com/seibel/lod/builders/LodBuilder.java | 10 +++------- .../seibel/lod/handlers/LodDimensionFileHandler.java | 12 ++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/seibel/lod/builders/LodBuilder.java b/src/main/java/com/seibel/lod/builders/LodBuilder.java index bcaaa64c9..58a3f9e6d 100644 --- a/src/main/java/com/seibel/lod/builders/LodBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodBuilder.java @@ -882,14 +882,10 @@ public class LodBuilder } } - if (blockState.getBlock() != Blocks.AIR - && blockState.getBlock() != Blocks.CAVE_AIR - && blockState.getBlock() != Blocks.BARRIER) - { - return true; - } + return blockState.getBlock() != Blocks.AIR + && blockState.getBlock() != Blocks.CAVE_AIR + && blockState.getBlock() != Blocks.BARRIER; } - return false; } } diff --git a/src/main/java/com/seibel/lod/handlers/LodDimensionFileHandler.java b/src/main/java/com/seibel/lod/handlers/LodDimensionFileHandler.java index 654df4b1b..b9531d511 100644 --- a/src/main/java/com/seibel/lod/handlers/LodDimensionFileHandler.java +++ b/src/main/java/com/seibel/lod/handlers/LodDimensionFileHandler.java @@ -286,16 +286,16 @@ public class LodDimensionFileHandler ex.printStackTrace(); } // check if this file can be written to by the file handler - if (fileVersion <= LOD_SAVE_FILE_VERSION) - { - // we are good to continue and overwrite the old file - } else // if(fileVersion > LOD_SAVE_FILE_VERSION) - { + if (fileVersion > LOD_SAVE_FILE_VERSION) { // the file we are reading is a newer version, // don't write anything, we don't want to accidently // delete anything the user may want. return; - } + } // if(fileVersion > LOD_SAVE_FILE_VERSION) + //else { + // we are good to continue and overwrite the old file + //} + } // the old file is good, now create a new save file