Vanilla works but fabric doesn't
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub mod api;
|
||||
pub mod auth;
|
||||
pub mod download;
|
||||
pub mod error;
|
||||
pub mod fabric;
|
||||
mod file;
|
||||
pub mod launch;
|
||||
|
||||
pub fn download_version(version: &str) {
|
||||
let base_path = PathBuf::from(std::env::home_dir().unwrap()).join(".saturn-launcher");
|
||||
let jre_path = base_path.join("jre");
|
||||
let instances_path = base_path.join("instances");
|
||||
let instance = instances_path.join(version);
|
||||
|
||||
download::download_minecraft_version(&instance, &jre_path, version).unwrap()
|
||||
}
|
||||
|
||||
pub fn launch_version(version: &str) {
|
||||
let base_path = PathBuf::from(std::env::home_dir().unwrap()).join(".saturn-launcher");
|
||||
let jre_path = base_path.join("jre");
|
||||
let instances_path = base_path.join("instances");
|
||||
let instance = instances_path.join(version);
|
||||
|
||||
launch::launch_minecraft_version(
|
||||
&instance,
|
||||
&jre_path,
|
||||
&format!("{version}-fabric"),
|
||||
&auth::Account::Offline {
|
||||
name: "Daddy".into(),
|
||||
uuid: "Daddy".into(),
|
||||
},
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
Reference in New Issue
Block a user