Fixed snapshots not properly loading .mcr files, made snapshots use fast mode.

This commit is contained in:
sk89q
2012-07-09 23:55:19 -07:00
parent 0d279e7706
commit 97380f28de
4 changed files with 10 additions and 20 deletions

View File

@ -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);
}
}
}