diff --git a/daedalus/Cargo.toml b/daedalus/Cargo.toml index ef5419919..dc5496aee 100644 --- a/daedalus/Cargo.toml +++ b/daedalus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "daedalus" -version = "0.1.5" +version = "0.1.6" authors = ["Jai A "] edition = "2018" license = "MIT" diff --git a/daedalus/src/minecraft.rs b/daedalus/src/minecraft.rs index 02d14424f..0e9a863bf 100644 --- a/daedalus/src/minecraft.rs +++ b/daedalus/src/minecraft.rs @@ -252,6 +252,13 @@ pub struct Library { #[serde(skip_serializing_if = "Option::is_none")] /// SHA1 Checksums for validating the library's integrity. Only present for forge libraries pub checksums: Option>, + #[serde(default = "default_include_in_classpath")] + /// Whether the library should be included in the classpath at the game's launch + pub include_in_classpath: bool, +} + +fn default_include_in_classpath() -> bool { + true } #[derive(Serialize, Deserialize, Debug, Clone)] diff --git a/daedalus_client/src/forge.rs b/daedalus_client/src/forge.rs index 48dae3abe..f9854b84c 100644 --- a/daedalus_client/src/forge.rs +++ b/daedalus_client/src/forge.rs @@ -230,7 +230,16 @@ pub async fn retrieve_data(uploaded_files: &mut Vec) -> Result<(), Error }).await??; - let mut libs : Vec = profile.libraries.into_iter().chain(version_info.libraries).collect(); + let mut libs : Vec = version_info.libraries.into_iter().chain(profile.libraries.into_iter().map(|x| Library { + downloads: x.downloads, + extract: x.extract, + name: x.name, + url: x.url, + natives: x.natives, + rules: x.rules, + checksums: x.checksums, + include_in_classpath: false + })).collect(); let mut local_libs : HashMap = HashMap::new(); @@ -286,7 +295,8 @@ pub async fn retrieve_data(uploaded_files: &mut Vec) -> Result<(), Error url: Some("".to_string()), natives: None, rules: None, - checksums: None + checksums: None, + include_in_classpath: false, }); } } @@ -321,7 +331,7 @@ pub async fn retrieve_data(uploaded_files: &mut Vec) -> Result<(), Error artifact.url = format_url(&*format!("maven/{}", artifact_path)); } } else if lib.url.is_some() { - lib.url = Some(format_url(&*format!("maven/{}", artifact_path))); + lib.url = Some(format_url("maven/")); } return Ok::(lib);