mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 19:06:41 +00:00
Fixed snapshots not properly loading .mcr files, made snapshots use fast mode.
This commit is contained in:
@ -155,6 +155,9 @@ public class SnapshotRestore {
|
||||
for (Map.Entry<BlockVector2D, ArrayList<Vector>> entry : neededChunks.entrySet()) {
|
||||
BlockVector2D chunkPos = entry.getKey();
|
||||
Chunk chunk;
|
||||
|
||||
boolean hasFastMode = editSession.hasFastMode();
|
||||
editSession.setFastMode(true);
|
||||
|
||||
try {
|
||||
chunk = chunkStore.getChunk(chunkPos, editSession.getWorld());
|
||||
@ -163,7 +166,7 @@ public class SnapshotRestore {
|
||||
// Now just copy blocks!
|
||||
for (Vector pos : entry.getValue()) {
|
||||
BaseBlock block = chunk.getBlock(pos);
|
||||
editSession.setBlock(pos, block);
|
||||
editSession.rawSetBlock(pos, block);
|
||||
}
|
||||
} catch (MissingChunkException me) {
|
||||
missingChunks.add(chunkPos);
|
||||
@ -176,6 +179,8 @@ public class SnapshotRestore {
|
||||
} catch (IOException ioe) {
|
||||
errorChunks.add(chunkPos);
|
||||
lastErrorMessage = ioe.getMessage();
|
||||
} finally {
|
||||
editSession.setFastMode(hasFastMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user