How to make a 3D voronoi generator?

Hi! I am making a mining game but I got a problem. I would like add round-shaped ore patch and I need to know how to make 3D voronoi first. Could you help me please?

though i cannot give you the full code heres a compiled list of stuff you should follow

want a game full of ore that is choosing the ore by its closest one meaning iterating over all “voxel” in a chunk,A chunk is useful for performance as over 10 voronoi “points” can cause lag even on 2d(my testing),Then in a voxel,Assuming 3d,Iterating over all of your ore voronoi point and chose the closest one

The above Almost impossible to be done performantly but ill go over the other one,First create a table of position in 1 chunk that is an ore vein (chunk is for better iliterating)Then figure out the distance at most which ore will generate on each point using math.random and math.randomseed with smart formula manipulation to make that every seed at the same voronoi generate the same distance,Then replace stuff in that distance with your “ores”

To put simply,Its not a voronoi,Its a 3d falloff map with random distance that you’re wanting