return false;
}
if (!inSimRange.pointIsInRange(p)){
return false;
}
BlockTransparent be = (BlockTransparent)b;
int newLightLevel = 0;
int highestBlock = chunks.getHighestBlockAtXY(p.x, p.y, tmp2i, highestBlockChunk);
if (p.z > highestBlock){
newLightLevel = 0;
}
else {
Vector3i[] neighbors = HexGeometry.getAllNeighbors(p.x);
int highestNeighborLightLevel = BlockTransparent.MAX_LIGHT_LEVEL;
for (Vector3i neighbor3 : neighbors) {
tmp3i2.x = p.x+neighbor3.x;
tmp3i2.y = p.y+neighbor3.y;
tmp3i2.z = p.z+neighbor3.z;
Block neighbor = chunks.getBlock(tmp3i2.x, tmp3i2.y, tmp3i2.z, tmp3i, chunk);
if (neighbor instanceof BlockTransparent){
int naturalOcclusion = 1;
if (neighbor3.z == 1)
naturalOcclusion = 0;
BlockTransparent neighborE = (BlockTransparent)neighbor;
highestNeighborLightLevel = Math.min(highestNeighborLightLevel, neighborE.getLightLevel()+naturalOcclusion+neighborE.occlusion);
}
}
newLightLevel = highestNeighborLightLevel;
}
if (newLightLevel != be.naturalLightLevel){
BlockTransparent newBE = BlockTools.updateLightLevel(be, newLightLevel);
blockDeltaAdder.addBlockDelta(BlockDelta.Aquire(p.x, p.y, p.z, newBE, startStepsToSim));
return INSTANT;
}
return false;
}