fix: lib directory should point to the local libs preffered, only shared libs as backup to prevent corruption neoforge installation
This commit is contained in:
1 parent
68d2f45236
commit
63d7ef0fa1
1 file changed
+2
-1
@@ -412,6 +412,7 @@ pub async fn build_launch_invocation(
|
|||||||
// so we check there first.
|
// so we check there first.
|
||||||
let has_local_libs = matches!(config.loader, ModLoader::Forge | ModLoader::NeoForge);
|
let has_local_libs = matches!(config.loader, ModLoader::Forge | ModLoader::NeoForge);
|
||||||
let local_lib_dir = minecraft_dir.join("libraries");
|
let local_lib_dir = minecraft_dir.join("libraries");
|
||||||
|
let library_directory = if has_local_libs { &local_lib_dir } else { &lib_dir };
|
||||||
|
|
||||||
let mut classpath: Vec<PathBuf> = Vec::new();
|
let mut classpath: Vec<PathBuf> = Vec::new();
|
||||||
for lib in &merged_profile.libraries {
|
for lib in &merged_profile.libraries {
|
||||||
@@ -501,7 +502,7 @@ pub async fn build_launch_invocation(
|
|||||||
.join("natives");
|
.join("natives");
|
||||||
let version_type = merged_profile.type_.as_deref().unwrap_or("release");
|
let version_type = merged_profile.type_.as_deref().unwrap_or("release");
|
||||||
let template_ctx = TemplateContext {
|
let template_ctx = TemplateContext {
|
||||||
library_directory: &lib_dir,
|
library_directory,
|
||||||
classpath_separator: sep,
|
classpath_separator: sep,
|
||||||
version_name: &config.game_version,
|
version_name: &config.game_version,
|
||||||
version_type,
|
version_type,
|
||||||
|
|||||||
Reference in new issue
Block a user