Check isLightOn flag as well
This commit is contained in:
parent
8c54bb2524
commit
0452ab1dac
1 changed files with 3 additions and 2 deletions
|
|
@ -895,7 +895,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
|
||||||
if (nbt == null) return null;
|
if (nbt == null) return null;
|
||||||
String status = nbt.getString("Status");
|
String status = nbt.getString("Status");
|
||||||
int version = orignbt.getInt("DataVersion");
|
int version = orignbt.getInt("DataVersion");
|
||||||
|
boolean lit = nbt.getBoolean("isLightOn");
|
||||||
boolean hasLitState = false;
|
boolean hasLitState = false;
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
for (int i = 0; i < litStates.length; i++) {
|
for (int i = 0; i < litStates.length; i++) {
|
||||||
|
|
@ -908,6 +908,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
|
||||||
GenericChunk.Builder bld = new GenericChunk.Builder(dw.minY, dw.worldheight);
|
GenericChunk.Builder bld = new GenericChunk.Builder(dw.minY, dw.worldheight);
|
||||||
int x = nbt.getInt("xPos");
|
int x = nbt.getInt("xPos");
|
||||||
int z = nbt.getInt("zPos");
|
int z = nbt.getInt("zPos");
|
||||||
|
|
||||||
// Set chunk info
|
// Set chunk info
|
||||||
bld.coords(x, z).chunkStatus(status).dataVersion(version);
|
bld.coords(x, z).chunkStatus(status).dataVersion(version);
|
||||||
|
|
||||||
|
|
@ -1091,7 +1092,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
|
||||||
sbld.reset();
|
sbld.reset();
|
||||||
}
|
}
|
||||||
// Assume skylight is only trustworthy in a lit state
|
// Assume skylight is only trustworthy in a lit state
|
||||||
if (!hasLitState) {
|
if ((!hasLitState) || (!lit)) {
|
||||||
hasLight = false;
|
hasLight = false;
|
||||||
}
|
}
|
||||||
// If no light, do simple generate
|
// If no light, do simple generate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue