detect launching offline without having minecraft assets downloaded

This commit is contained in:
maskers 2024-07-15 20:51:23 +03:00
parent 6dc93746c6
commit 3cc8ecde4a

View file

@ -26,6 +26,7 @@ pub async fn find(log: &str, data: &Data) -> Result<Vec<(String, String)>> {
forge_missing_dependencies,
legacyjavafixer,
locked_jar,
offline_launch,
];
let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect();
@ -310,3 +311,15 @@ fn locked_jar(log: &str) -> Issue {
let found = log.contains("Couldn't extract native jar");
found.then_some(issue)
}
fn offline_launch(log: &str) -> Issue {
let issue = (
"Missing Libraries".to_string(),
"You seem to be missing libraries.
To fix this, try doing `Edit > Version > Download All` and then launching your instance again."
.to_string(),
);
let found = log.contains("(missing)\n");
found.then_some(issue)
}