private void download(URL url, File file, int size)
	{
		System.out.println("Downloading: " + file.getName() + "...");

		//minecraft.progressBar.setText(file.getName());

		DataInputStream in = null;
		DataOutputStream out = null;

		try
		{
			byte[] data = new byte[4096];

			in = new DataInputStream(url.openStream());
			FileOutputStream fos = new FileOutputStream(file);
			out = new DataOutputStream(fos);

			int done = 0;

			do
			{
				int length = in.read(data);

				if(length < 0)
				{
					in.close();
					out.close();

					return;
				}

				out.write(data, 0, length);

				done += length;
				progress = (int)(((double)done / (double)size) * 100);
			} while(!running);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try
			{
				if(in != null)
				{
					in.close();
				}

				if(out != null)
				{
					out.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		//minecraft.progressBar.setText("");
		progress = 0;

		System.out.println("Downloaded: " + file.getName());
	}