mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 12:06:15 +01:00
Fixed chunk offset
This commit is contained in:
parent
c9cbc904c3
commit
f472c6a2f5
@ -170,8 +170,8 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
final ArrayList<Chunk> chunks = new ArrayList<>();
|
final ArrayList<Chunk> chunks = new ArrayList<>();
|
||||||
final ArrayList<Chunk> toGenerate = new ArrayList<>();
|
final ArrayList<Chunk> toGenerate = new ArrayList<>();
|
||||||
// Load chunks
|
// Load chunks
|
||||||
for (int x = c1x; x <= c2x; x++) {
|
for (int x = c2x; x <= c3x; x++) {
|
||||||
for (int z = c1z; z <= c2z; z++) {
|
for (int z = c2z; z <= c3z; z++) {
|
||||||
final Chunk chunk = world.getChunkAt(x, z);
|
final Chunk chunk = world.getChunkAt(x, z);
|
||||||
toGenerate.add(chunk);
|
toGenerate.add(chunk);
|
||||||
}
|
}
|
||||||
@ -192,15 +192,15 @@ public class BukkitChunkManager extends ChunkManager {
|
|||||||
index.increment();
|
index.increment();
|
||||||
// Copy entities
|
// Copy entities
|
||||||
initMaps();
|
initMaps();
|
||||||
for (int x = c3x; x <= c4x; x++) {
|
for (int x = c1x; x <= c2x; x++) {
|
||||||
for (int z = c3z; z <= c4z; z++) {
|
for (int z = c1z; z <= c2z; z++) {
|
||||||
final Chunk chunk = world.getChunkAt(x, z);
|
final Chunk chunk = world.getChunkAt(x, z);
|
||||||
chunks.add(chunk);
|
chunks.add(chunk);
|
||||||
chunk.load(false);
|
chunk.load(false);
|
||||||
saveEntitiesIn(chunk, region);
|
saveEntitiesIn(chunk, region);
|
||||||
restoreEntities(world, relX, relZ);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
restoreEntities(world, relX, relZ);
|
||||||
// Copy blocks
|
// Copy blocks
|
||||||
final MutableInt mx = new MutableInt(sx);
|
final MutableInt mx = new MutableInt(sx);
|
||||||
final Integer currentIndex = index.toInteger();
|
final Integer currentIndex = index.toInteger();
|
||||||
|
Loading…
Reference in New Issue
Block a user