This is the source code for a simple 3D block-based terrain generator using Perlin noise that I am using for a small personal project. I felt like sharing it because I imagine someone out there might want it.
Basically plug-and-play, make all the modifications you want and there are comments either in line or near to help you understand. If you'd like, feel free to throw me in the credits somewhere if it helped at all, go nuts.