feat: Forge+Connector 兼容——资源提取改 CoreSwapFixHelper 多级定位 jarFix/forge connector compat - #3
Closed
dustinmoon78 wants to merge 2 commits into
Closed
Conversation
CppBridge.java 已在上次修复(ca87548)改为 coreswap, 但 CppWorldgen.extractNativeDll() 仍硬编码 worldgen-bench, FabricLoader.getModContainer().get() 抛 NoSuchElementException, 全新环境解压 worldgen.dll 时启动崩溃。
原 extractWorldgenDir/extractNativeDll 依赖 FabricLoader.getRootPaths(), 在 Forge 宿主 + Sinytra Connector 环境下(Forge UnionFileSystem 的 Path 无法 Files.isDirectory/walk;Forge TransformingClassLoader 下 getCodeSource() 返回 /)资源提取失败。 新增 wg/bench/CoreSwapFixHelper:多级定位 mod jar (getCodeSource → FabricLoader.getAllMods().ModOrigin.getPaths() → ClassLoader.getResources),JarFile 直接提取 worldgen-data / worldgen.dll, 不依赖任何加载器路径 API。实测 Forge 47.3.33 + Connector 1.0.0-beta.46 可正常生成。
Contributor
Author
|
@unknowbug 您好,这是 1.0.4 全新环境启动崩溃(NoSuchElementException)的修复:
已实测:Forge 47.3.33 + Connector 1.0.0-beta.46 + 400+ mod 整合包正常生成。请 review,谢谢! |
Owner
|
已手动合入本 PR 的 CoreSwapFixHelper 思路(commit 见 master)并增强 dev classpath 目录支持(Fabric 开发环境回归通过)。1.0.6 已发布(Pre-release,Forge 需 Sinytra Connector)。感谢贡献! |
unknowbug
added a commit
that referenced
this pull request
Aug 6, 2026
…代 getRootPaths;增强 dev classpath 目录支持);Fabric 回归通过
unknowbug
pushed a commit
that referenced
this pull request
Aug 6, 2026
Owner
|
补一条正式致谢:您的贡献已在 README(英文版 Credits / 中文版 致谢 段)署名,见 commit c61d96c。 再次感谢 Forge + Sinytra Connector 兼容的攻坚——400+ mod 整合包实测通过,这份工作量非常扎实。后续您的 PR 会走标准合并流程,确保贡献记录完整保留。 |
1 similar comment
Owner
|
补一条正式致谢:您的贡献已在 README(英文版 Credits / 中文版 致谢 段)署名,见 commit c61d96c。 再次感谢 Forge + Sinytra Connector 兼容的攻坚——400+ mod 整合包实测通过,这份工作量非常扎实。后续您的 PR 会走标准合并流程,确保贡献记录完整保留。 |
unknowbug
added a commit
that referenced
this pull request
Aug 7, 2026
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.
Forge 47.3.33 + Sinytra Connector 环境下,原资源提取方式失效:
新增 wg/bench/CoreSwapFixHelper:多级定位 mod jar
(getCodeSource → FabricLoader.getAllMods().ModOrigin.getPaths() → ClassLoader.getResources),
用 JarFile 直接提取 worldgen-data / worldgen.dll,不依赖任何加载器路径 API。
CppBridge.extractWorldgenDir / CppWorldgen.extractNativeDll 改为调用它。
已实测:Forge 47.3.33 + Connector 1.0.0-beta.46 + 400+ mod 整合包,正常生成。
注:本 PR 基于 PR#1 分支(stacked),包含其一行 mod id 修复。