while ((v = fifo.read()) != null) {
int center = v.getW();
log("(Lower) checking center (W = " + v.getW() + ")", v, center);
BlockMaterial m = material.get(v.getX(), v.getY(), v.getZ());
if (m == BlockMaterial.UNGENERATED) {
continue;
}
final boolean boundary = v.getX() == baseX || v.getX() == (topX - 1) || v.getY() == baseY || v.getY() == topY - 1 || v.getZ() == baseZ || v.getZ() == topZ - 1;
for (BlockFace face : allFaces) {
IntVector3 off = face.getIntOffset();
int nx = v.getX() + off.getX();
int ny = v.getY() + off.getY();
int nz = v.getZ() + off.getZ();
if (boundary && (nx < baseX || nx >= topX || ny <= baseY || ny >= topY || nz < baseZ || nz >= topZ)) {
continue;
}
BlockMaterial other = material.get(nx, ny, nz);
if (other == BlockMaterial.UNGENERATED) {
continue;
}
log("(Lower) checking neighbor: material=" + other, nx, ny, nz);
int oldLevel = getLightLevel(light, nx, ny, nz);
log("(Lower) old light", nx, ny, nz, oldLevel);
if (oldLevel > 0) {
int opacity = other.getOpacity() + 1;
int oldSupportLevel = center - opacity;
log("(Lower) supported light", nx, ny, nz, oldSupportLevel);