diff --git a/src/de/steamwar/spectatesystem/util/WorldLoader.java b/src/de/steamwar/spectatesystem/util/WorldLoader.java index b767022..bd767a5 100644 --- a/src/de/steamwar/spectatesystem/util/WorldLoader.java +++ b/src/de/steamwar/spectatesystem/util/WorldLoader.java @@ -55,13 +55,7 @@ public class WorldLoader { for(int cZ = (int) Math.floor(Config.ArenaMinZ / 16.0); cZ <= (int) Math.floor(Config.ArenaMaxZ / 16.0); cZ++){ int finalCX = cX; int finalCZ = cZ; - Bukkit.getScheduler().runTaskLater(SpectateSystem.get(), () -> { - reloadChunk(backupWorld, finalCX, finalCZ); - if(finalCZ < 0) - System.out.println("Reload chunk " + finalCX + " " + finalCZ); - }, delay++); - if(cZ < 0) - System.out.println("Scheduled chunk " + cX + " " + cZ); + Bukkit.getScheduler().runTaskLater(SpectateSystem.get(), () -> reloadChunk(backupWorld, finalCX, finalCZ), delay++); } } @@ -76,7 +70,7 @@ public class WorldLoader { net.minecraft.server.v1_15_R1.Chunk cchunk = ((CraftChunk) world.getChunkAt(cX, cZ)).getHandle(); for(int y = 255; y >= 0; y--){ // y top down to reduce lightning calculations for(int x = cX * 16; x < (cX + 1) * 16; x++){ - for(int z = cZ; z < (cZ + 1) * 16; z++){ + for(int z = cZ * 16; z < (cZ + 1) * 16; z++){ BlockPosition blockPos = new BlockPosition(x, y, z); IBlockData backupBlock = backup.getType(blockPos); if(backupBlock == cworld.getType(blockPos))