Would this workout?
private void generateSurface(World world, Random rand, int chunkX, int chunkZ) {
int firstBlockXCoord = chunkX + rand.nextInt(16);
int firstBlockYCoord = rand.nextInt(32);
int firstBlockZCoord = chunkZ + rand.nextInt(16);
if (world.getBiomeGenForCoords(firstBlockXCoord, firstBlockZCoord) == BiomeGenBase.ocean){
for(int k = 0; k < 10; k++){
firstBlockXCoord = chunkX + rand.nextInt(16);
firstBlockYCoord = rand.nextInt(32);
firstBlockZCoord = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Base.RedOre.blockID, 15)).generate(world, rand, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord);
System.out.println("spawned");
}
}
}
The ocean is huge so I don't know how much time would it take to find it.