Skip to content

fix: 26.x版本mc启动时,缺失Java提示的弹窗始终为Java1#3435

Merged
SALTWOOD merged 1 commit into
PCL-Community:devfrom
qiMengStars:fix/3425
Jul 18, 2026
Merged

fix: 26.x版本mc启动时,缺失Java提示的弹窗始终为Java1#3435
SALTWOOD merged 1 commit into
PCL-Community:devfrom
qiMengStars:fix/3425

Conversation

@qiMengStars

@qiMengStars qiMengStars commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

close #3425

Summary by Sourcery

Bug Fixes:

  • 修复最低 Java 版本计算逻辑,使其使用所需的 Java 主版本号,而不是始终假定为 Java 1.x。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Fix minimum Java version calculation so the required Java major version is used instead of always assuming Java 1.x.

@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: XS PR 大小评估:微型 labels Jul 18, 2026
@sourcery-ai

sourcery-ai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor
评审者指南(在小型 PR 中折叠)

评审者指南

调整最低必需 Java 版本的计算方式,使启动器能正确反映 Mojang 推荐的 Java 主版本号,而不是把它当作 Java 1.x 的次版本号来处理。

文件级改动

变更 详情 文件
修复最低 Java 版本构造逻辑,使 recommendedCode 被用作主版本号,而不是被解释为 Java 1.x 的次版本号。
  • 日志消息仍然使用 recommendedCode 报告 Mojang 要求的 Java 版本。
  • 将 minVer 初始化从 Version(1, recommendedCode, 0, 0) 更改为 Version(recommendedCode, 0, 0, 0),以便让推荐值映射到 Java 的主版本号。
  • 保持从 JsonObject/JsonVersion 获取 recommendedComponent 的逻辑不变。
Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.cs

与关联 Issue 的对照评估

Issue 目标 是否解决 说明
#3425 修复 Minecraft 26.x 的 Java 版本需求处理逻辑,使缺少 Java 的提示和相关逻辑使用正确的主版本号(例如 Java 26 而不是 Java 1.x)。

可能关联的 Issue


提示与命令

与 Sourcery 交互

  • 触发新的评审: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的评审评论。
  • 从评审评论生成 GitHub Issue: 回复 Sourcery 的某条评审评论,要求其从该评论创建 issue。你也可以直接回复该评论 @sourcery-ai issue 来从中创建一个 issue。
  • 生成 pull request 标题: 在 pull request 标题中任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文任意位置写上 @sourcery-ai summary,即可在该位置生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 来在任意时间(重新)生成摘要。
  • 生成评审者指南: 在 pull request 中评论 @sourcery-ai guide,即可在任意时间(重新)生成评审者指南。
  • 批量解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可将所有 Sourcery 评论标记为已解决。如果你已经处理完所有评论且不想再看到它们,这非常有用。
  • 批量忽略所有 Sourcery 评审: 在 pull request 中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 评审。如果你想重新开始一次新的评审,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新的评审!

自定义你的使用体验

访问你的 控制面板 以:

  • 启用或禁用评审功能,例如 Sourcery 生成的 pull request 摘要、评审者指南等。
  • 更改评审语言。
  • 添加、移除或编辑自定义评审说明。
  • 调整其他评审设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the minimum required Java version calculation so that the launcher correctly reflects Mojang’s recommended major Java version instead of treating it as a minor version under Java 1.x.

File-Level Changes

Change Details Files
Fix minimum Java version construction so recommendedCode is used as the major version instead of being interpreted as a minor version of Java 1.x.
  • Log message still reports Mojang’s required Java version using recommendedCode.
  • Change minVer initialization from Version(1, recommendedCode, 0, 0) to Version(recommendedCode, 0, 0, 0) so the recommended code maps to the major Java version.
  • Leave retrieval of recommendedComponent from JsonObject/JsonVersion unchanged.
Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#3425 Fix the Java version requirement handling for Minecraft 26.x so that the missing-Java prompt and associated logic use the correct major version (e.g., Java 26 instead of Java 1.x).

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

嗨——我已经审查了你的修改,看起来非常棒!


Sourcery 对开源项目是免费的——如果你觉得我们的审查有帮助,请考虑分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@pcl-ce-automation pcl-ce-automation Bot added 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 and removed 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 labels Jul 18, 2026
@SALTWOOD
SALTWOOD merged commit 4dc9aa1 into PCL-Community:dev Jul 18, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Jul 18, 2026
@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 and removed 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 labels Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS PR 大小评估:微型 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C#]: 下载26.2原版启动时提示要用Java1,实际下载为Java26

4 participants