From a393e0a2f2c3678a3ea869dc1417fa269f2b1040 Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Sat, 24 Jan 2026 08:29:14 +0100 Subject: Resolve audio not loading bug Ensure all assets are downloading for each version Temporarily disable minecraft versions older than 1.8 because of the asset/manifest loading issues Implement basic documentation of modules Implement basic async/multithreading for downloading assets --- src/main.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8a01b9f..e229a3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,9 +8,15 @@ mod util; use clap::Parser; use config::Config; +use dotenvy::dotenv; use errors::McError; use log::{debug, info}; +use crate::minecraft::{ + downloads::download_all, extraction::extract_natives, launcher::launch, + manifests, +}; + #[derive(Parser, Debug)] #[command(author, about, disable_version_flag = true)] struct Cli { @@ -26,7 +32,7 @@ struct Cli { #[tokio::main] async fn main() -> Result<(), McError> { - dotenvy::dotenv().ok(); + dotenv().ok(); env_logger::init(); let cli = Cli::parse(); @@ -48,13 +54,13 @@ async fn main() -> Result<(), McError> { platform::paths::ensure_dirs(&config)?; info!("Using Minecraft version {}", config.version); - let version = minecraft::manifests::load_version(&config).await?; + let version = manifests::load_version(&config).await?; info!("Loaded version manifest for: {}", version.id); debug!("Main class: {}", version.main_class); - minecraft::downloads::download_all(&config, &version).await?; - minecraft::extraction::extract_natives(&config, &version)?; - minecraft::launcher::launch(&config, &version)?; + download_all(&config, &version).await?; + extract_natives(&config, &version)?; + launch(&config, &version)?; Ok(()) } -- cgit v1.2.3