mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
Try to load chunk if it is not (yet) available.
This commit is contained in:
parent
37b4d560b4
commit
c2d8df8e94
14
MapTile.java
14
MapTile.java
@ -82,8 +82,18 @@ public class MapTile {
|
|||||||
for(x=x1; x<x2; x+=16) {
|
for(x=x1; x<x2; x+=16) {
|
||||||
for(z=z1; z<z2; z+=16) {
|
for(z=z1; z<z2; z+=16) {
|
||||||
if(!s.isChunkLoaded(x, 0, z)) {
|
if(!s.isChunkLoaded(x, 0, z)) {
|
||||||
log.info("chunk not loaded: " + x + ", " + z + " for tile " + this.toString());
|
// Will try to load chunk.
|
||||||
return false;
|
//log.info("chunk not loaded: " + x + ", " + z + " for tile " + this.toString());
|
||||||
|
try {
|
||||||
|
s.loadChunk(x, 0, z);
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.log(Level.SEVERE, "Caught exception from loadChunk!", e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!s.isChunkLoaded(x, 0, z)) {
|
||||||
|
log.info("Could not load chunk: " + x + ", " + z + " for tile " + this.toString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user