diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index 5ce23e7..0c4de57 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -70,13 +70,17 @@ public class CommandCore { timer.schedule(task, 50, 50); - timer.schedule(refillTask, 50, 900); + timer.schedule(refillTask, 50, 1000); } private void tick () { final ClientPlayNetworkHandler networkHandler = client.getNetworkHandler(); - if (networkHandler == null) cleanup(); + if (networkHandler == null) { + cleanup(); + + return; + } reloadRelativeArea(); @@ -92,10 +96,10 @@ public class CommandCore { if (networkHandler == null || withPos == null) return; - for (int x = withPos.start.getX(); x <= withPos.end.getX(); x++) { - for (int y = withPos.start.getY(); y <= withPos.end.getY(); y++) { - for (int z = withPos.start.getZ(); z <= withPos.end.getZ(); z++) { - try { + try { + for (int x = withPos.start.getX(); x <= withPos.end.getX(); x++) { + for (int y = withPos.start.getY(); y <= withPos.end.getY(); y++) { + for (int z = withPos.start.getZ(); z <= withPos.end.getZ(); z++) { final BlockPos pos = new BlockPos(x, y, z); final ClientWorld world = client.world; @@ -109,11 +113,11 @@ public class CommandCore { shouldRefill = true; return; - } catch (Exception e) { - e.printStackTrace(); } } } + } catch (Exception e) { + e.printStackTrace(); } }