Use:
\vspace{${latex.block.getEmptyLinesCount()}\baselineskip}
instead of
\\[${latex.block.getEmptyLinesCount()}ex]