One sided vertices in 3d graphics

Hello everyone, I recently starting coding a voxel game in processing. However, there is a lot of lag whenever rendering the cubes, say 1000 of them, because cube faces are being drawn that the player cannot see (the cubes are textured). I have tried many optimizations to weed out the unnecessary cube faces, which turns a filled-in mess of 1000 cubes into a hollow shell of 1000 cubes. However, there is still a lot of lag. I think that part of the problem is that textures are being drawn inside the cubes’ hollow shells. Textures are being drawn on the inside and outside of a cube. How would I make processing stop rendering textures on the inside of the cubes?