[Bug] MCBBS格式整合包导入时,若作者使用curse类型且不填写url,HMCL无法成功下载任何文件
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 10.1k
- Forks
- 934
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 82
Description
问题描述 | Bug Description
https://github.com/HMCL-dev/HMCL/blob/6ce7af05b2962390c7ff138e2a45b88211801be8/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/mcbbs/McbbsModpackManifest.java#L331-L335
由于CurseForge改版,这样的url拼接在事实上无法成功下载任何文件
以Create模组,6.0.10,适用于1.21.1的这个文件举例,projectID为328085,fileID为7963363,现在的代码会拼接为
https://www.curseforge.com/minecraft/mc-mods/328085/download/7963363/file
即使在浏览器打开,这也会成功拿到一个404的返回值
好在curseforge保留了老网页的正常工作,只需把www换为legacy,如
https://legacy.curseforge.com/minecraft/mc-mods/328085/download/7963363/file
在不触发CloudFlare 5秒盾的情况下能经过2次跳转下载到jar
启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File
我认为不需要
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at HMCLCore/src/main/java/org/jackhuang/hmcl/mod/mcbbs/McbbsModpackManifest.java, especially lines 331-335, and inspect how CurseForge URLs are assembled when an author omits the URL. Reproduce the Create 6.0.10 example with project ID 328085 and file ID 7963363, then verify that importing the MCBBS modpack can download the file successfully without a 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100