
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.util.registry.Registry
SolidBlock-cn opened this issue · 2 comments
I referred to this article and placed my class in rrp:pregen entrypoint. However, when launching client, errors caused.
Error info as follows:
[16:57:17] [main/INFO] (ARRP) I used the json to destroy the json
[16:57:18] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.properties file on the classpath
[16:57:19] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236)
at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
... 3 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.util.registry.Registry
at net.minecraft.Bootstrap.initialize(Bootstrap.java:44)
at net.minecraft.client.main.Main.main(Main.java:139)
... 8 more
与目标 VM 断开连接, 地址为: ''127.0.0.1:13528',传输: '套接字''
进程已结束,退出代码为 1
Source code can be referred to at https://github.com/SolidBlock-cn/extshape/tree/1.17-with_arrp.
Issue does not happen if "rrp:pregen" in "fabric.mod.json" is empty, which means the class does not load.
Also does not happen if the "pregen" method is empty.