Skip to content

为I18n mod添加下载窗口#48

Open
502y wants to merge 8 commits intoCFPAOrg:mainfrom
502y:downloading_windows
Open

为I18n mod添加下载窗口#48
502y wants to merge 8 commits intoCFPAOrg:mainfrom
502y:downloading_windows

Conversation

@502y
Copy link
Contributor

@502y 502y commented Nov 27, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a download progress window for the I18n mod, providing users with visual feedback during resource pack download and installation operations.

Key changes:

  • Introduces a Swing-based GUI window (LoadDetailUI) that displays download progress, logs, and allows users to cancel operations
  • Implements stage tracking through the LoadStage enum to monitor progress through initialization, download, conversion, and application phases
  • Integrates logging throughout the download workflow to keep users informed

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
src/main/java/i18nupdatemod/core/LoadDetailUI.java New Swing GUI window for displaying download progress with progress bar, log area, and cancel functionality
src/main/java/i18nupdatemod/entity/LoadStage.java New enum defining five stages of the loading process with descriptions
src/main/java/i18nupdatemod/I18nUpdateMod.java Integrated LoadDetailUI display and shutdown checks at key points in the init workflow
src/main/java/i18nupdatemod/core/I18nConfig.java Added log messages when fetching mirror sources
src/main/java/i18nupdatemod/core/ResourcePack.java Added log messages for download status and completion
src/main/java/i18nupdatemod/core/ResourcePackConverter.java Added log message during resource pack conversion
build.gradle.kts Modified resource processing to handle JSON files separately from mod.json files
src/main/resources/icons/CFPA.png New icon resource for the window
src/main/resources/icons/CFPA_with_title.png New icon resource with title

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AI is so great

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SlimeSB
Copy link

SlimeSB commented Nov 27, 2025

feat: 出现错误时由手动关闭改为5s后自动关闭
feat: 出现错误时允许异步重试,同时提示请手动加载资源包

或者5s后自动重试,同时显示停止按钮避免一直循环。

@502y
Copy link
Contributor Author

502y commented Jan 4, 2026

feat: 出现错误时由手动关闭改为5s后自动关闭 feat: 出现错误时允许异步重试,同时提示请手动加载资源包

或者5s后自动重试,同时显示停止按钮避免一直循环。

自动关闭做好了,个人体感5s略短,改成了6秒。异步重试我想想

@WingChunWong
Copy link

是我的问题吗,拉到本地看了一下并没有出现gui

@SlimeSB
Copy link

SlimeSB commented Jan 21, 2026

该 feat 在 1.21.1 neoforge 确认可以生效

@502y
Copy link
Contributor Author

502y commented Feb 26, 2026

是我的问题吗,拉到本地看了一下并没有出现gui

我怀疑和JDK有关,我本地的Zulu 8的java.awt.headless是true,但是通过设置环境变量强制改为false又能够正常显示GUI。强制修改环境变量会在真的headless的JDK上面抛出异常(虽然我猜能运行MC客户端的JDK应该都不是无头),所以目前是这么放着了。

@WingChunWong
Copy link

WingChunWong commented Feb 26, 2026

是我的问题吗,拉到本地看了一下并没有出现gui

我怀疑和JDK有关,我本地的Zulu 8的java.awt.headless是true,但是通过设置环境变量强制改为false又能够正常显示GUI。强制修改环境变量会在真的headless的JDK上面抛出异常(虽然我猜能运行MC客户端的JDK应该都不是无头),所以目前是这么放着了。

我用的是Zulu JDK 21

@502y
Copy link
Contributor Author

502y commented Feb 27, 2026

是我的问题吗,拉到本地看了一下并没有出现gui

我怀疑和JDK有关,我本地的Zulu 8的java.awt.headless是true,但是通过设置环境变量强制改为false又能够正常显示GUI。强制修改环境变量会在真的headless的JDK上面抛出异常(虽然我猜能运行MC客户端的JDK应该都不是无头),所以目前是这么放着了。

我用的是Zulu JDK 21

晚上我看看能不能复现

@WingChunWong
Copy link

是我的问题吗,拉到本地看了一下并没有出现gui

我怀疑和JDK有关,我本地的Zulu 8的java.awt.headless是true,但是通过设置环境变量强制改为false又能够正常显示GUI。强制修改环境变量会在真的headless的JDK上面抛出异常(虽然我猜能运行MC客户端的JDK应该都不是无头),所以目前是这么放着了。

我用的是Zulu JDK 21

晚上我看看能不能复现

版本 1.21.1 fabric

@502y
Copy link
Contributor Author

502y commented Feb 27, 2026

是我的问题吗,拉到本地看了一下并没有出现gui

我怀疑和JDK有关,我本地的Zulu 8的java.awt.headless是true,但是通过设置环境变量强制改为false又能够正常显示GUI。强制修改环境变量会在真的headless的JDK上面抛出异常(虽然我猜能运行MC客户端的JDK应该都不是无头),所以目前是这么放着了。

我用的是Zulu JDK 21

晚上我看看能不能复现

版本 1.21.1 fabric

已复现,JDK默认为无头状态,修改"java.awt.headless"属性可显示。我比较担心改成纯客户端模组也会有玩家的JDK是真无头。

@WingChunWong

This comment was marked as resolved.

@WingChunWong
Copy link

WingChunWong commented Mar 2, 2026

还是没有

C:/Program Files/Zulu/zulu-21/bin/javaw.exe

Java is version 21.0.8, using 64 (amd64) architecture, from Azul Systems, Inc..
[20:56:29] [Render thread/WARN]: disabled "Before Name" rendermode due to incompatibility with modernui
[20:56:29] [Render thread/WARN]: @Redirect conflict. Skipping mixins.tweakeroo.json:render.MixinGameRenderer_ViewBob from mod tweakeroo->@Redirect::tweakeroo_disableWorldViewBob(Lnet/minecraft/class_757;Lnet/minecraft/class_4587;F)V with priority 999, already redirected by mixins.iris.json:MixinModelViewBobbing from mod iris->@Redirect::iris$stopBobbing(Lnet/minecraft/class_757;Lnet/minecraft/class_4587;F)V with priority 1000
[20:56:30] [Render thread/INFO]: [ETF]: Modifying ETF Render State constructor because: for EMF
[20:56:30] [Render thread/INFO]: Loading Entity Model Features, we get there when we get there.
[20:56:30] [Render thread/INFO]: [ETF]: 6 new ETF Random Properties registered by entity_model_features
[20:56:30] [Render thread/INFO]: Loading Entity Texture Features, you just lost the game.
[20:56:30] [Render thread/INFO]: [Indigo] Different rendering plugin detected; not applying Indigo.
[2026-03-02 20:56:30] [INFO]: I18nUpdate Mod 3.7.0-SNAPSHOT is loaded in 1.21.1 with Fabric
[2026-03-02 20:56:30] [INFO]: Using fastest url: https://raw.githubusercontent.com/
[2026-03-02 20:56:31] [INFO]: Converting: C:\Users\huang\AppData\Local\.i18nupdatemod\1.21\Minecraft-Mod-Language-Modpack-1-21-Fabric.zip
[2026-03-02 20:56:32] [INFO]: Converting: C:\Users\huang\AppData\Local\.i18nupdatemod\1.20\Minecraft-Mod-Language-Modpack-1-20-Fabric.zip
[2026-03-02 20:56:32] [INFO]: Converting: C:\Users\huang\AppData\Local\.i18nupdatemod\1.19\Minecraft-Mod-Language-Modpack-1-19.zip
[2026-03-02 20:56:32] [INFO]: Converted: [C:\Users\huang\AppData\Local\.i18nupdatemod\1.21\Minecraft-Mod-Language-Modpack-1-21-Fabric.zip, C:\Users\huang\AppData\Local\.i18nupdatemod\1.20\Minecraft-Mod-Language-Modpack-1-20-Fabric.zip, C:\Users\huang\AppData\Local\.i18nupdatemod\1.19\Minecraft-Mod-Language-Modpack-1-19.zip] -> C:\Users\huang\AppData\Local\.i18nupdatemod\1.21.1\Minecraft-Mod-Language-Modpack-Converted-1.21.1.zip
[2026-03-02 20:56:32] [INFO]: Synchronized: C:\Users\huang\AppData\Local\.i18nupdatemod\1.21.1\Minecraft-Mod-Language-Modpack-Converted-1.21.1.zip -> C:\Users\huang\AppData\Roaming\PrismLauncher\instances\1.21.1\minecraft\resourcepacks\Minecraft-Mod-Language-Modpack-Converted-1.21.1.zip
[20:56:32] [Render thread/INFO]: it is Windows OS! Loading mod...
[20:56:32] [Render thread/INFO]: Modern UI client config loaded/reloaded
[20:56:32] [Render thread/INFO]: Modern UI text config loaded/reloaded
[20:56:32] [Render thread/INFO]: Created TextLayoutEngine
[20:56:32] [Render thread/INFO]: Created MuiFabricApi
[20:56:32] [Render thread/INFO]: Initialized Modern UI text engine
[20:56:32] [Render thread/INFO]: Initialized Modern UI client
[20:56:32] [Render thread/INFO]: Checking mod updates...
Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=false
openjdk version "21.0.8" 2025-07-15 LTS
OpenJDK Runtime Environment Zulu21.44+17-CA (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Zulu21.44+17-CA (build 21.0.8+9-LTS, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants