Apply lighting workaround to 1.16.5+
This commit is contained in:
parent
7307e3d734
commit
61a71f8a0b
7 changed files with 24 additions and 155 deletions
|
|
@ -25,20 +25,6 @@ public class MapChunkCache116_4 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.LIGHT)) { // ChunkStatus.LIGHT
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load generic chunk from existing and already loaded chunk
|
||||
protected GenericChunk getLoadedChunk(DynmapChunk chunk) {
|
||||
|
|
@ -50,9 +36,6 @@ public class MapChunkCache116_4 extends GenericMapChunkCache {
|
|||
if ((c != null) && c.loaded) {
|
||||
nbt = ChunkRegionLoader.saveChunk(cw.getHandle(), c);
|
||||
}
|
||||
if (!isLitChunk(nbt)) {
|
||||
nbt = null;
|
||||
}
|
||||
if (nbt != null) {
|
||||
gc = parseChunkFromNBT(new NBT.NBTCompound(nbt));
|
||||
}
|
||||
|
|
@ -70,9 +53,6 @@ public class MapChunkCache116_4 extends GenericMapChunkCache {
|
|||
nbt = cw.getHandle().getChunkProvider().playerChunkMap.read(cc);
|
||||
} catch (IOException iox) {
|
||||
}
|
||||
if (!isLitChunk(nbt)) {
|
||||
nbt = null;
|
||||
}
|
||||
if (nbt != null) {
|
||||
gc = parseChunkFromNBT(new NBT.NBTCompound(nbt));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue