Apply lighting workaround to 1.16.5+

This commit is contained in:
Mike Primm 2021-12-16 12:32:10 -06:00
parent eff72aeef0
commit 69a6bb2a2a
7 changed files with 24 additions and 155 deletions

View file

@ -29,20 +29,6 @@ public class MapChunkCache117 extends GenericMapChunkCache {
super(cc);
init();
}
private boolean isLitChunk(NBTTagCompound nbt) {
if ((nbt != null) && nbt.hasKey("Level")) {
nbt = nbt.getCompound("Level");
}
if (nbt != null) {
String stat = nbt.getString("Status");
ChunkStatus cs = ChunkStatus.a(stat);
if ((stat != null) && cs.b(ChunkStatus.l)) { // ChunkStatus.LIGHT
return true;
}
}
return false;
}
// Load generic chunk from existing and already loaded chunk
protected GenericChunk getLoadedChunk(DynmapChunk chunk) {
@ -54,9 +40,6 @@ public class MapChunkCache117 extends GenericMapChunkCache {
if ((c != null) && c.h) { // c.loaded
nbt = ChunkRegionLoader.saveChunk(cw.getHandle(), c);
}
if (!isLitChunk(nbt)) {
nbt = null;
}
if (nbt != null) {
gc = parseChunkFromNBT(new NBT.NBTCompound(nbt));
}
@ -74,9 +57,6 @@ public class MapChunkCache117 extends GenericMapChunkCache {
nbt = cw.getHandle().getChunkProvider().a.read(cc); // playerChunkMap
} catch (IOException iox) {
}
if (!isLitChunk(nbt)) {
nbt = null;
}
if (nbt != null) {
gc = parseChunkFromNBT(new NBT.NBTCompound(nbt));
}