Hi - I'm the author of the mod UberWaffe mentioned. The source for the current version is here. The actual ore generation algorithms are in src/CustomOreGen/Server/MapGen****. The classes are heavily tied to the Minecraft structure generation system, but the core algorithms can be lifted out...