Added calculateFactor for setupEntityLightingGrid.