Skip to content

fix(download): 移除数据包的快速下载功能#3241

Merged
SALTWOOD merged 2 commits into
devfrom
fix/datapack-quick-download
Jun 22, 2026
Merged

fix(download): 移除数据包的快速下载功能#3241
SALTWOOD merged 2 commits into
devfrom
fix/datapack-quick-download

Conversation

@SALTWOOD

@SALTWOOD SALTWOOD commented Jun 22, 2026

Copy link
Copy Markdown
Member

由于数据包一般需要放置到存档的 datapacks 文件夹内,因此快速下载功能需要选择存档,会增加耦合性

由 Sourcery 提供的摘要

禁用数据包的快速下载支持,以减少与特定存档目录的耦合。

错误修复:

  • 在下载页面中隐藏数据包条目的快速下载按钮。
  • 从快速下载目标路径映射中移除对数据包的处理,以防止错误下载。
Original summary in English

Summary by Sourcery

Disable quick download support for datapacks to reduce coupling with specific save directories.

Bug Fixes:

  • Hide the quick download button for datapack items in the download page.
  • Remove datapack handling from the quick download target path mapping to prevent incorrect downloads.

@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: XS PR 大小评估:微型 labels Jun 22, 2026
@SALTWOOD SALTWOOD requested a review from a team June 22, 2026 16:31
@sourcery-ai

sourcery-ai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
审阅者指南(在小型 PR 上默认折叠)

审阅者指南

在现有对整合包(modpack)的限制基础上,禁用数据包(datapack)条目的快速下载功能,并移除未使用的数据包快速下载目标映射,这样快速下载工作流将不再处理数据包。

数据包变更后快速下载按钮可见性的流程图

flowchart TD
    A[PageComp.Load_OnFinish] --> B[Determine PageType]
    B --> C{PageType}
    C --> D[showQuickDownload = false]
    C --> E[showQuickDownload = true]

    C -->|ModPack| D
    C -->|DataPack| D
    C -->|Other types| E
Loading

移除数据包后快速下载目标解析的流程图

flowchart TD
    A[_StartQuickDownload] --> B[Resolve target subfolder by CompType]
    B --> C{CompType}
    C -->|ResourcePack| D[resourcepacks\\]
    C -->|Shader| E[shaderpacks\\]
    C -->|World| F[saves\\]
    C -->|DataPack| G[" "]

    style G fill:#fdd,stroke:#f66,stroke-width:1px

    %% Note: DataPack case is now unreachable because quick download is disabled for DataPack
Loading

文件级变更

变更 详情 文件
在下载 UI 中为数据包条目禁用快速下载按钮。
  • 扩展快速下载可见性条件,使其在页面类型为 DataPack 时也返回 false。
  • 更新说明性注释,提到数据包需要放置到特定存档(save)中。
Plain Craft Launcher 2/Pages/PageDownload/Comp/PageComp.xaml.cs
从快速下载目标路径分发器中移除对数据包的处理。
  • 从快速下载目标路径 switch 表达式中删除 DataPack 枚举分支,这样数据包将不再解析出快速下载目录。
Plain Craft Launcher 2/Modules/Minecraft/ModComp.cs

使用技巧与命令

与 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

Disables quick download for datapack entries alongside existing modpack restriction and removes the unused datapack quick-download target mapping so datapacks are no longer handled by the quick download workflow.

Flow diagram for quick download button visibility after datapack change

flowchart TD
    A[PageComp.Load_OnFinish] --> B[Determine PageType]
    B --> C{PageType}
    C --> D[showQuickDownload = false]
    C --> E[showQuickDownload = true]

    C -->|ModPack| D
    C -->|DataPack| D
    C -->|Other types| E
Loading

Flow diagram for quick download target resolution after datapack removal

flowchart TD
    A[_StartQuickDownload] --> B[Resolve target subfolder by CompType]
    B --> C{CompType}
    C -->|ResourcePack| D[resourcepacks\\]
    C -->|Shader| E[shaderpacks\\]
    C -->|World| F[saves\\]
    C -->|DataPack| G[" "]

    style G fill:#fdd,stroke:#f66,stroke-width:1px

    %% Note: DataPack case is now unreachable because quick download is disabled for DataPack
Loading

File-Level Changes

Change Details Files
Disable quick download button for datapack items in the download UI.
  • Extend the quick-download visibility condition to also return false when the page type is DataPack.
  • Update the explanatory comment to mention datapacks needing placement into a specific save.
Plain Craft Launcher 2/Pages/PageDownload/Comp/PageComp.xaml.cs
Remove datapack handling from the quick download target-path dispatcher.
  • Delete the DataPack enum case from the quick-download target path switch expression so datapacks no longer resolve a quick-download directory.
Plain Craft Launcher 2/Modules/Minecraft/ModComp.cs

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff61ff14c1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Plain Craft Launcher 2/Pages/PageDownload/Comp/PageComp.xaml.cs Outdated
@pcl-ce-automation pcl-ce-automation Bot added 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 and removed 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 labels Jun 22, 2026
@SALTWOOD SALTWOOD merged commit ce86d40 into dev Jun 22, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Jun 22, 2026
@SALTWOOD SALTWOOD deleted the fix/datapack-quick-download branch June 22, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS PR 大小评估:微型 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants