Workaround to get 1.14 working

This commit is contained in:
Mike Primm 2019-05-03 21:46:06 -05:00
parent e8ec7da47d
commit 7851e112c5

View File

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