Handle ChunkStatus on 1.13.2 better

This commit is contained in:
Mike Primm 2020-05-03 20:33:46 -05:00
parent 151122a333
commit f1b1af399d
1 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.chunk.storage.AnvilChunkLoader;
import net.minecraft.world.chunk.storage.IChunkLoader;
@ -1100,7 +1101,10 @@ public class ForgeMapChunkCache extends MapChunkCache
rslt = rslt.getCompound("Level");
// Don't load uncooked chunks
String stat = rslt.getString("Status");
if ((stat == null) || (stat.equals("full") == false)) {
ChunkStatus cs = ChunkStatus.getByName(stat);
if ((stat == null) ||
// Needs to be at least lighted
(!cs.isAtLeast(ChunkStatus.LIGHTED))) {
rslt = null;
}
}