mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Workaround to get 1.14 working
This commit is contained in:
parent
e8ec7da47d
commit
7851e112c5
@ -66,22 +66,19 @@ public class MapChunkCache114 extends AbstractMapChunkCache {
|
||||
}
|
||||
@Override
|
||||
public boolean loadChunkNoGenerate(World w, int x, int z) {
|
||||
boolean rslt = w.loadChunk(x, z, false);
|
||||
// Workaround for Spigot 1.13.2 bug - check if generated and do load-with-generate if so to drive migration of old chunks
|
||||
if (!rslt) {
|
||||
boolean generated = true;
|
||||
// Check one in each direction: see if all are generated
|
||||
for (int xx = x-3; xx <= x+3; xx++) {
|
||||
for (int zz = z-3; zz <= z+3; zz++) {
|
||||
if (w.isChunkGenerated(xx, zz) == false) {
|
||||
generated = false;
|
||||
break;
|
||||
}
|
||||
boolean generated = true;
|
||||
// Check one in each direction: see if all are generated
|
||||
for (int xx = x-4; xx <= x+4; xx++) {
|
||||
for (int zz = z-4; zz <= z+4; zz++) {
|
||||
if (w.isChunkGenerated(xx, zz) == false) {
|
||||
generated = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (generated) {
|
||||
rslt = w.loadChunk(x, z, true);
|
||||
}
|
||||
}
|
||||
boolean rslt = false;
|
||||
if (generated) {
|
||||
rslt = w.loadChunk(x, z, true);
|
||||
}
|
||||
return rslt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user