From f472c6a2f58e4d9b7741cd6d1955232269402e45 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Mon, 23 Feb 2015 20:03:42 +1100 Subject: [PATCH] Fixed chunk offset --- .../plot/util/bukkit/BukkitChunkManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitChunkManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitChunkManager.java index ea108e872..5c556aabf 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitChunkManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitChunkManager.java @@ -170,8 +170,8 @@ public class BukkitChunkManager extends ChunkManager { final ArrayList chunks = new ArrayList<>(); final ArrayList toGenerate = new ArrayList<>(); // Load chunks - for (int x = c1x; x <= c2x; x++) { - for (int z = c1z; z <= c2z; z++) { + for (int x = c2x; x <= c3x; x++) { + for (int z = c2z; z <= c3z; z++) { final Chunk chunk = world.getChunkAt(x, z); toGenerate.add(chunk); } @@ -192,15 +192,15 @@ public class BukkitChunkManager extends ChunkManager { index.increment(); // Copy entities initMaps(); - for (int x = c3x; x <= c4x; x++) { - for (int z = c3z; z <= c4z; z++) { + for (int x = c1x; x <= c2x; x++) { + for (int z = c1z; z <= c2z; z++) { final Chunk chunk = world.getChunkAt(x, z); chunks.add(chunk); chunk.load(false); saveEntitiesIn(chunk, region); - restoreEntities(world, relX, relZ); } } + restoreEntities(world, relX, relZ); // Copy blocks final MutableInt mx = new MutableInt(sx); final Integer currentIndex = index.toInteger();