mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Fix #1243
This commit is contained in:
parent
2e0de7b197
commit
1a0f7df3f4
@ -286,6 +286,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
if (chunk.chunkSet.getSkyLight() != null) {
|
if (chunk.chunkSet.getSkyLight() != null) {
|
||||||
int layer = y >> 4;
|
int layer = y >> 4;
|
||||||
layer -= chunk.chunkSet.getMinSectionIndex();
|
layer -= chunk.chunkSet.getMinSectionIndex();
|
||||||
|
if (layer >= 0 && layer < chunk.chunkSet.getSectionCount()) {
|
||||||
if (chunk.chunkSet.getSkyLight()[layer] != null) {
|
if (chunk.chunkSet.getSkyLight()[layer] != null) {
|
||||||
int setLightValue = chunk.chunkSet.getSkyLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
int setLightValue = chunk.chunkSet.getSkyLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
||||||
if (setLightValue < 16) {
|
if (setLightValue < 16) {
|
||||||
@ -293,6 +294,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return chunk.chunkExisting.getSkyLight(x, y, z);
|
return chunk.chunkExisting.getSkyLight(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +303,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
if (chunk.chunkSet.getLight() != null) {
|
if (chunk.chunkSet.getLight() != null) {
|
||||||
int layer = y >> 4;
|
int layer = y >> 4;
|
||||||
layer -= chunk.chunkSet.getMinSectionIndex();
|
layer -= chunk.chunkSet.getMinSectionIndex();
|
||||||
|
if (layer >= 0 && layer < chunk.chunkSet.getSectionCount()) {
|
||||||
if (chunk.chunkSet.getLight()[layer] != null) {
|
if (chunk.chunkSet.getLight()[layer] != null) {
|
||||||
int setLightValue = chunk.chunkSet.getLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
int setLightValue = chunk.chunkSet.getLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
||||||
if (setLightValue < 16) {
|
if (setLightValue < 16) {
|
||||||
@ -308,6 +311,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return chunk.chunkExisting.getEmittedLight(x, y, z);
|
return chunk.chunkExisting.getEmittedLight(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,6 +602,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
if (chunk.chunkSet.getSkyLight() != null) {
|
if (chunk.chunkSet.getSkyLight() != null) {
|
||||||
int layer = y >> 4;
|
int layer = y >> 4;
|
||||||
layer -= chunk.chunkSet.getMinSectionIndex();
|
layer -= chunk.chunkSet.getMinSectionIndex();
|
||||||
|
if (layer >= 0 && layer < chunk.chunkSet.getSectionCount()) {
|
||||||
if (chunk.chunkSet.getSkyLight()[layer] != null) {
|
if (chunk.chunkSet.getSkyLight()[layer] != null) {
|
||||||
int setLightValue = chunk.chunkSet.getSkyLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
int setLightValue = chunk.chunkSet.getSkyLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
||||||
if (setLightValue < 16) {
|
if (setLightValue < 16) {
|
||||||
@ -605,6 +610,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
chunk.getOrCreateGet();
|
chunk.getOrCreateGet();
|
||||||
chunk.delegate = BOTH;
|
chunk.delegate = BOTH;
|
||||||
chunk.chunkExisting.trim(false);
|
chunk.chunkExisting.trim(false);
|
||||||
@ -616,6 +622,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
if (chunk.chunkSet.getLight() != null) {
|
if (chunk.chunkSet.getLight() != null) {
|
||||||
int layer = y >> 4;
|
int layer = y >> 4;
|
||||||
layer -= chunk.chunkSet.getMinSectionIndex();
|
layer -= chunk.chunkSet.getMinSectionIndex();
|
||||||
|
if (layer >= 0 && layer < chunk.chunkSet.getSectionCount()) {
|
||||||
if (chunk.chunkSet.getLight()[layer] != null) {
|
if (chunk.chunkSet.getLight()[layer] != null) {
|
||||||
int setLightValue = chunk.chunkSet.getLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
int setLightValue = chunk.chunkSet.getLight()[layer][(y & 15) << 8 | (z & 15) << 4 | (x & 15)];
|
||||||
if (setLightValue < 16) {
|
if (setLightValue < 16) {
|
||||||
@ -623,6 +630,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
chunk.getOrCreateGet();
|
chunk.getOrCreateGet();
|
||||||
chunk.delegate = BOTH;
|
chunk.delegate = BOTH;
|
||||||
chunk.chunkExisting.trim(false);
|
chunk.chunkExisting.trim(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user