fix(wrapper): 更换老旧的 RetroWrapper 到 LegacyFix#3155
Closed
zkitefly wants to merge 58 commits into
Closed
Conversation
审阅者指南使用 LegacyFix 替换基于 RetroWrapper 的旧版 Minecraft 处理逻辑,简化版本门控逻辑,并将 LegacyFix 接入 JVM 参数和资源解压流程,同时移除未使用的 RetroWrapper 特定代码路径。 Minecraft 启动中 LegacyFix 集成的时序图sequenceDiagram
participant Launcher as McLaunch
participant ArgsJvm as McLaunchArgumentsJvmNew
participant ArgsReplace as McLaunchArgumentsReplace
participant NeedsLegacyFix as McLaunchNeedsLegacyFix
participant ModBase
participant JVM
Launcher->>ArgsJvm: McLaunchArgumentsJvmNew(instance)
ArgsJvm->>NeedsLegacyFix: McLaunchNeedsLegacyFix(instance)
alt [LegacyFix needed]
ArgsJvm->>ArgsReplace: McLaunchArgumentsReplace(instance)
ArgsReplace->>NeedsLegacyFix: McLaunchNeedsLegacyFix(instance)
alt [LegacyFix needed]
ArgsReplace->>ModBase: WriteFile(legacyFixPath, GetResourceStream)
end
ArgsJvm->>ArgsJvm: dataList.Add(-javaagent:legacyfix.jar)
alt [instance.releaseTime < 2011-05-25]
ArgsJvm->>ArgsJvm: dataList.Add(-Djava.util.Arrays.useLegacyMergeSort=true)
end
end
ArgsJvm-->>Launcher: jvmArgs
Launcher->>JVM: Launch with jvmArgs
文件级变更
提示与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's GuideReplace RetroWrapper-based legacy Minecraft handling with LegacyFix, simplifying the version gating logic and wiring LegacyFix into JVM args and resource extraction while removing unused RetroWrapper-specific code paths. Sequence diagram for LegacyFix integration in Minecraft launchsequenceDiagram
participant Launcher as McLaunch
participant ArgsJvm as McLaunchArgumentsJvmNew
participant ArgsReplace as McLaunchArgumentsReplace
participant NeedsLegacyFix as McLaunchNeedsLegacyFix
participant ModBase
participant JVM
Launcher->>ArgsJvm: McLaunchArgumentsJvmNew(instance)
ArgsJvm->>NeedsLegacyFix: McLaunchNeedsLegacyFix(instance)
alt [LegacyFix needed]
ArgsJvm->>ArgsReplace: McLaunchArgumentsReplace(instance)
ArgsReplace->>NeedsLegacyFix: McLaunchNeedsLegacyFix(instance)
alt [LegacyFix needed]
ArgsReplace->>ModBase: WriteFile(legacyFixPath, GetResourceStream)
end
ArgsJvm->>ArgsJvm: dataList.Add(-javaagent:legacyfix.jar)
alt [instance.releaseTime < 2011-05-25]
ArgsJvm->>ArgsJvm: dataList.Add(-Djava.util.Arrays.useLegacyMergeSort=true)
end
end
ArgsJvm-->>Launcher: jvmArgs
Launcher->>JVM: Launch with jvmArgs
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
- 针对
<1.6和Beta 1.6使用的硬编码日期阈值,如果能提取成具名常量(例如LEGACY_FIX_INTRODUCTION_DATE、BETA_16_RELEASE_DATE)并在需要的地方复用,会更加清晰且不易出错。 - 在构建诸如
legacyFixPath这样的文件系统路径时,建议使用Path.Combine而不是手动字符串拼接,以避免路径分隔符问题并提升可读性。
用于 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The hard-coded date thresholds for `<1.6` and `Beta 1.6` would be clearer and less error-prone if extracted into named constants (e.g., `LEGACY_FIX_INTRODUCTION_DATE`, `BETA_16_RELEASE_DATE`) and reused wherever needed.
- When building file system paths such as `legacyFixPath`, consider using `Path.Combine` instead of manual string concatenation to avoid path separator issues and improve readability.帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- The hard-coded date thresholds for
<1.6andBeta 1.6would be clearer and less error-prone if extracted into named constants (e.g.,LEGACY_FIX_INTRODUCTION_DATE,BETA_16_RELEASE_DATE) and reused wherever needed. - When building file system paths such as
legacyFixPath, consider usingPath.Combineinstead of manual string concatenation to avoid path separator issues and improve readability.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hard-coded date thresholds for `<1.6` and `Beta 1.6` would be clearer and less error-prone if extracted into named constants (e.g., `LEGACY_FIX_INTRODUCTION_DATE`, `BETA_16_RELEASE_DATE`) and reused wherever needed.
- When building file system paths such as `legacyFixPath`, consider using `Path.Combine` instead of manual string concatenation to avoid path separator issues and improve readability.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
|
所以这个 LegacyFix 是? |
Contributor
Author
https://github.com/betacraftuk/legacyfix 换他的原因是他一直在更新,而且他们就是专门做这个的,应该效果更好 |
This comment was marked as resolved.
This comment was marked as resolved.
* refactor(help): remove help feature * refactor(help): remove remaining help references * chore(april): restore HMCL eastereggs
* chore(form-main): 移除`UpgradeSub`中的远古配置迁移代码 * remove `MigrateOldProfile` * 1 * 2 * revert
* chore(tool-test): remove `BtnCrash_Click` * Visibility * 1 * chore(test): update BtnCrash visibility for debugging
fix(open-website): 修复浏览器配置错误时未观测到的异步异常 [Composer] 将 OpenWebsite 中的 Process.Start 改为同步调用,使既有 try/catch 能捕获打开失败并显示降级提示,与 ShellOnly 一致。 Close PCL-Community#2993 Co-authored-by: Cursor <cursoragent@cursor.com>
…#3150) * fix(mod-main): 修复提示右对齐时被右下角附加按钮遮挡 (PCL-Community#3147) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ui): 提示层级改用 XAML Panel.ZIndex 设置,始终高于其他控件 (PCL-Community#3147) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This reverts commit cdd7896.
This reverts commit 7910570.
* refactor: remove async suffix [SKIP CI] * refactor: remove async suffix [SKIP CI] * refactor: remove async suffix and token argument required [SKIP CI] * refactor: remove async suffix and improve xml doc string [SKIP CI] * refactor: remove token pass * fix: remove async
Contributor
Author
|
不小心把别人的 commit 也给签名了,换个分支把( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RetroWrapper 太久没更新了,用 LegacyFix 更有保障
文件版本:https://github.com/betacraftuk/legacyfix/actions/runs/25253333468
Summary by Sourcery
将已过时的 RetroWrapper 集成替换为 LegacyFix,用于启动旧版本的 Minecraft。
增强内容:
Original summary in English
Summary by Sourcery
Replace the outdated RetroWrapper integration with LegacyFix for launching legacy Minecraft versions.
Enhancements: