While this code might seem like an easy and obvious way to create a block-based voxel world, creating a unique box for each block/voxel is actually extremely taxing on the GPU - one of the primary bottlenecks for GPU performance is the total geometry count - so 10k verts split between 10k geometries will run extremely slower than a single geometry with 10k verts.
So the solution in your case would be to use a voxel engine that handles batching many blocks/voxels into a single geometry everytime a block is added or removed, and that will give the player the illusion that each block is unique. So Minecraft, for example, uses a single irregular geometry for each chunk, even though a chunk can consist of atleast 64x64x256 blocks.
I am no expert on voxel based games, but I know there’s a few voxel libraries for JME that you could find with a quick search, and hopefully other users on these forums can also help to recommend the best one for your use case.
(however this is the most commonly used and up to date one, to my knowledge: Blocks)