parent
c5ba4b1fea
commit
6e02ef7a78
|
@ -207,7 +207,7 @@ public class MCAWorld implements World {
|
|||
}
|
||||
}
|
||||
|
||||
private Chunk loadChunkOrEmpty(Vector2i chunkPos, int tries, long tryInterval) throws InterruptedException {
|
||||
private Chunk loadChunkOrEmpty(Vector2i chunkPos, int tries, long tryInterval) {
|
||||
Exception loadException = null;
|
||||
for (int i = 0; i < tries; i++) {
|
||||
try {
|
||||
|
@ -217,7 +217,12 @@ public class MCAWorld implements World {
|
|||
loadException = e;
|
||||
|
||||
if (tryInterval > 0 && i+1 < tries) {
|
||||
Thread.sleep(tryInterval);
|
||||
try {
|
||||
Thread.sleep(tryInterval);
|
||||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -263,8 +268,9 @@ public class MCAWorld implements World {
|
|||
} else {
|
||||
throw new IOException("Invalid data tag: " + (tag == null ? "null" : tag.getClass().getName()));
|
||||
}
|
||||
} catch (RuntimeException | IOException e) {
|
||||
throw new IOException("Exception trying to load chunk (" + chunkPos + ")", e);
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue