You've already forked AstralRinth
forked from didirus/AstralRinth
refactor: remove init_authlib_patching function and update related references
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Logic for launching Minecraft
|
||||
use crate::data::ModLoader;
|
||||
use crate::event::emit::{emit_loading, emit_info, init_or_edit_loading};
|
||||
use crate::event::emit::{emit_info, emit_loading, init_or_edit_loading};
|
||||
use crate::event::{LoadingBarId, LoadingBarType};
|
||||
use crate::launcher::download::download_log_config;
|
||||
use crate::launcher::io::IOError;
|
||||
@@ -11,8 +11,8 @@ use crate::profile::QuickPlayType;
|
||||
use crate::state::{
|
||||
AccountType, Credentials, JavaVersion, ProcessMetadata, ProfileInstallStage,
|
||||
};
|
||||
use crate::util::{io, utils};
|
||||
use crate::util::rpc::RpcServerBuilder;
|
||||
use crate::util::{io, utils};
|
||||
use crate::{State, get_resource_file, process, state as st};
|
||||
use chrono::Utc;
|
||||
use daedalus as d;
|
||||
@@ -671,30 +671,33 @@ pub async fn launch_minecraft(
|
||||
if version_jar == "1.16.4" || version_jar == "1.16.5" {
|
||||
let invalid_url = "https://invalid.invalid";
|
||||
let _ = emit_info(&format!(
|
||||
"[AR] • Detected launch of {} on the offline account. Applying 1.16.4/5 multiplayer fixes.",
|
||||
"[AR] Detected launch of {} on the offline account. Applying 1.16.4/5 multiplayer fixes.",
|
||||
version_jar
|
||||
)
|
||||
).await;
|
||||
command.arg("-Dminecraft.api.env=custom");
|
||||
command.arg(format!("-Dminecraft.api.auth.host={}", invalid_url));
|
||||
command.arg(format!("-Dminecraft.api.account.host={}", invalid_url));
|
||||
command.arg(format!("-Dminecraft.api.session.host={}", invalid_url));
|
||||
command.arg(format!("-Dminecraft.api.services.host={}", invalid_url));
|
||||
command
|
||||
.arg(format!("-Dminecraft.api.account.host={}", invalid_url));
|
||||
command
|
||||
.arg(format!("-Dminecraft.api.session.host={}", invalid_url));
|
||||
command
|
||||
.arg(format!("-Dminecraft.api.services.host={}", invalid_url));
|
||||
}
|
||||
} else if credentials.account_type == AccountType::ElyBy.as_lowercase_str()
|
||||
{
|
||||
let _ = emit_info(&format!(
|
||||
"[AR] • Detected launch of {} on the Ely.by account. Loading Ely.by AuthLib Injector...",
|
||||
"[AR] Detected launch of {} on the Ely.by account. Loading Ely.by AuthLib Injector...",
|
||||
version_jar
|
||||
)
|
||||
).await;
|
||||
let path_buf = utils::get_or_download_elyby_injector().await?;
|
||||
let path_buf = utils::get_elyby_injector_library().await?;
|
||||
let path = path_buf.to_str().unwrap();
|
||||
let _ = emit_info(&format!(
|
||||
"[AR] • Launching minecraft instance with {}",
|
||||
let _ = emit_info(&format!(
|
||||
"[AR] Launching minecraft instance with {}",
|
||||
path
|
||||
)
|
||||
).await;
|
||||
))
|
||||
.await;
|
||||
command.arg(format!("-javaagent:{}=ely.by", path));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user