HMCL-dev / HMCL-dev/HMCL

同时安装Optifine和Forge时,检查是否兼容

Open
#2,063 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

看了一下 BMCLAPI 的文档,发现获取 Optifine 列表中有提供 Forge 对应支持的版本

https://bmclapidoc.bangbang93.com/#api-Optifine-getOptifineVersionList

[
    {
        "_id": "6307b8a38a3998ab475d139d",
        "mcversion": "1.19.2",
        "patch": "H9",
        "type": "HD_U",
        "__v": 0,
        "filename": "OptiFine_1.19.2_HD_U_H9.jar",
        "forge": "Forge 43.1.1" //←就是这个
    },
    {.....
]

点击安装后,当检测到玩家同时安装的 Optifine 与所支持的 Forge 不对应或 Optifine 版本不支持 Forge 时 (Forge N/A) ,提示用户更换或卸载 Forge / Optifine 。

弄这个的一点事,如果 forge 这个 key 为空或没有这个 key 时就跳过检查

建议检查 value 内容是否小于10内容,如果小于就跳过检查

如果 forge 这个 key 带有 # 时,应该提取 # 后面的内容,并检查 Forge 版本号是否包含该字符

image

若没有 # 就可以直接使用其字符内容查找 Forge 版本号

因为观察发现 Optifine 1.12.2 的支持列表是以 Forge #XXXX 来写的

然后就是 BMCLAPI 镜像爬取内容时一些版本似乎没有该内容,所以为空或没有。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the OptiFine installation flow and the handling of the BMCLAPI OptiFine version-list response. Check how installed Forge and OptiFine versions are identified, then compare the documented forge values, including Forge N/A, empty values, and # markers. Done means incompatible combinations prompt the user while missing compatibility data skips the check.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.