public void processLower(Iterable<IntVector3> coords, IntVector4ExpandableFIFO fifo, IntVector4ExpandableFIFO regen, ChunkCuboidLightBufferWrapper<VanillaCuboidLightBuffer> light, ImmutableCuboidBlockMaterialBuffer material, ImmutableHeightMapBuffer height) {
Iterator<IntVector3> itr = coords.iterator();
while (itr.hasNext()) {
IntVector3 v = itr.next();
int lightLevel = getLightLevel(light, v.getX(), v.getY(), v.getZ());
log("(Lower) Root light level", v, lightLevel);
if (lightLevel == 0) {
continue;
}
int newLight = this.computeLightLevel(light, material, height, v.getX(), v.getY(), v.getZ());
log("(Lower) New light level", v, newLight);
if (newLight < lightLevel) {
setLightLevel(light, v.getX(), v.getY(), v.getZ(), 0);
fifo.write(lightLevel, v.getX(), v.getY(), v.getZ());
log("(Lower) Set (0) and added to FIFO for ", v, lightLevel);
}
}
Vector3f base = material.getBase();
int baseX = base.getFloorX();
int baseY = base.getFloorY();
int baseZ = base.getFloorZ();
Vector3f top = material.getTop();
int topX = top.getFloorX();
int topY = top.getFloorY();
int topZ = top.getFloorZ();
IntVector4 v;
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);