Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于文章的一些细节错误 #7

Open
MiniDay opened this issue Sep 28, 2020 · 0 comments
Open

关于文章的一些细节错误 #7

MiniDay opened this issue Sep 28, 2020 · 0 comments
Assignees

Comments

@MiniDay
Copy link

MiniDay commented Sep 28, 2020

简介-CoreMod-使用FML等ModLoader的原因
有一行文字表述不清
CoreMod可以通过修改其他类的行为是直接修改文件还是在运行时动态修改分为两种类型


Java虚拟机-ByteCode字节码
文章无内容


原版CoreMod-LaunchWrapper-加载流程
代码有误

final URLClassLoader ucl = (URLClassLoader) getClass().getClassLoader();
classLoader = new LaunchClassLoader(ucl.getURLs());
...
Thread.currentThread().setContextClassLoader(classLoader);
  • 由于从Java9开始,不再默认使用URLClassLoader而是AppClassLoader,在Java9及以上的版本这一行代码会发生ClassCastException导致游戏崩溃,直到ModLauncher才修复了这一问题
final URLClassLoader ucl = (URLClassLoader) getClass().getClassLoader();

后半段代码没有修改(实际上我也不知道后面这个代码块到底是想要指出错误代码还是贴出修复后的代码,所以不确定这个到底是不是错误)


原版CoreMod-ModLauncher-使用Forge加载
表述有误

从Forge 1.13.2-25.0.216开始,可以使用Forge来加载无论是否包含普通Mod的ModLauncher CoreMod。

“无论是否”听起来有些别扭,可能无法清晰表述愿意。


@xfl03 xfl03 self-assigned this Sep 29, 2020
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

No branches or pull requests

2 participants