From d14d0e131bbd84e18c92ea278024a491f5d1eb4b Mon Sep 17 00:00:00 2001 From: Brady Date: Sat, 25 Aug 2018 00:24:19 -0500 Subject: [PATCH] Better comment explaining new folder depth check --- src/main/java/baritone/chunk/WorldProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/chunk/WorldProvider.java b/src/main/java/baritone/chunk/WorldProvider.java index b444725a..709ddff8 100644 --- a/src/main/java/baritone/chunk/WorldProvider.java +++ b/src/main/java/baritone/chunk/WorldProvider.java @@ -61,7 +61,7 @@ public enum WorldProvider implements Helper { IAnvilChunkLoader loader = (IAnvilChunkLoader) provider.getChunkLoader(); directory = loader.getChunkSaveLocation(); - // In the case of any dimension that isn't the overworld, we'll see a number other than 2 (likely 3) + // Gets the "depth" of this directory relative the the game's run directory, 2 is the location of the world if (directory.toPath().relativize(mc.gameDir.toPath()).getNameCount() != 2) { // subdirectory of the main save directory for this world directory = directory.getParentFile(); @@ -79,7 +79,7 @@ public enum WorldProvider implements Helper { try (FileOutputStream out = new FileOutputStream(new File(readme, "readme.txt"))) { // good thing we have a readme out.write("https://github.com/cabaletta/baritone\n".getBytes()); - } catch (IOException ex) {} + } catch (IOException ignored) {} directory = new File(directory, "DIM" + dimensionID); Path dir = directory.toPath();