Skip to content

Conversation

@xunying123
Copy link
Collaborator

@xunying123 xunying123 commented Nov 19, 2025

Checklist

  • Changes have been tested locally and work as expected.
  • All tests in workflows pass successfully.
  • Documentation has been updated if necessary.
  • Code formatting and commit messages align with the project's conventions.
  • Comments have been added for any complex logic or functionality if possible.

This PR is a ..

  • 🆕 New feature
  • 🐞 Bug fix
  • 🛠 Refactoring
  • ⚡️ Performance improvement
  • 🌐 Internationalization
  • 📄 Documentation improvement
  • 🎨 Code style optimization
  • ❓ Other (Please specify below)

Description

  • support install optifine

close #959

@UNIkeEN
Copy link
Owner

UNIkeEN commented Nov 23, 2025

this PR closes #959

@xunying123 xunying123 changed the title [WIP]feat(instance): support install optifine feat(instance): support install optifine Dec 31, 2025
@UNIkeEN
Copy link
Owner

UNIkeEN commented Jan 1, 2026

测试中,我在以下多个配置下都遇到了 NO_DOWNLOAD_API 的报错:

QQ_1767236046164 QQ_1767236086492

add_library_entry(&mut client_info.libraries, &optifine_runtime_coord, None)?;
let lw_main = "net.minecraft.launchwrapper.Launch".to_string();

// 是否需要考虑到已经有过了
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

项目中请使用英文注释,如果是待讨论或待完成请使用 NOTE: 或 TODO:

let optifine_rel = convert_library_name_to_path(&optifine_coord, None)?;
let optifine_path = libraries_dir.join(&optifine_rel);
if !installer_path.exists() {
return Err(InstanceError::LoaderNotDownloaded.into());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个错误是新引入的吗,之前 forge 和 neoforge 的 finish install 没有检查或者可复用的吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是新引入的,因为刚发现之前都没有检测installer是否存在,所以如果用户在下载完和执行安装之间的很短的时间把installer删掉了就会出问题

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是新引入的,因为刚发现之前都没有检测installer是否存在,所以如果用户在下载完和执行安装之间的很短的时间把installer删掉了就会出问题

那感觉可以改个名比如 LoaderInstallerNotFound 啥的?现在和 loader 的 NotDownloaded 状态有点混淆(那个应该对应重新开启下载?是吗 @Reqwey

btw,之前都没有检测的话,另外两个是不是也可以加一下(?

@UNIkeEN
Copy link
Owner

UNIkeEN commented Jan 1, 2026

前端需要增设 实例-光影 页面的 加载器 section,以及更换光影加载器的 modal(复用 or 独立?)

@UNIkeEN
Copy link
Owner

UNIkeEN commented Jan 1, 2026

42a124f11c8febf73c197d828bebf9db

考虑此列固定宽度(百分比或 chakra size),考虑到文字长度可变与多语言的问题,感觉可以加 minW?保证中文下点击四个长度一样(中文最长是点击 NeoForge 时的长度,感觉挺合适的);外语如果变长就让他们比 minW 长

@UNIkeEN
Copy link
Owner

UNIkeEN commented Jan 1, 2026

另外,Optifine 类之后是不是可以改名 OptifineInfo;ModLoader 也拆出来把结构体叫 ModLoaderInfo;对应一些函数逻辑里的变量名和实际意义

Instance 结构体里的对应字段名不变(mod_loader, optifine)

@UNIkeEN UNIkeEN merged commit dbe39b9 into UNIkeEN:main Jan 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 增加加载器的种类

3 participants