[QUILT 1.19.2] Can't run game with Mythic Metals, SimplySwords and Gobber2
serratedserenade opened this issue ยท 2 comments
I commented on the Curseforge page but I probably should put it here.
Error:
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'simplyswords'!
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$2(EntrypointUtils.java:66)
at org.quiltmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:34)
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:64)
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invokeContainer(EntrypointUtils.java:49)
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:36)
at org.quiltmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:55)
at net.minecraft.class_310.<init>(class_310.java:459)
at net.minecraft.client.main.Main.method_44604(Main.java:205)
at net.minecraft.client.main.Main.main(Main.java:51)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:529)
at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:82)
at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: java.lang.ExceptionInInitializerError
at net.sweenus.simplyswords.fabric.SimplySwordsFabric.onInitialize(SimplySwordsFabric.java:28)
at org.quiltmc.loader.impl.game.minecraft.Hooks.lambda$startClient$0(Hooks.java:55)
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke$0(EntrypointUtils.java:36)
at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:62)
... 16 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Float.floatValue()" because the return value of "java.util.HashMap.get(Object)" is null
at net.sweenus.simplyswords.config.SimplySwordsConfig.getWeaponAttributes(SimplySwordsConfig.java:42)
at net.sweenus.simplyswords.compat.GobberCompat.<clinit>(GobberCompat.java:16)
... 20 more
Checking code, managed to make it work with the following changes:
SimplySwordsFabric.java
@Override
public void onInitialize() {
//Only run our init if Mythic Metals is not installed
if (!FabricLoader.getInstance().isModLoaded("mythicmetals")) {
SimplySwords.init();
if (FabricLoader.getInstance().isModLoaded("gobber2")) {
GobberCompat.registerModItems();
}
}
MythicMetalsInitMixin.java
public void init(CallbackInfo info) {
System.out.println("SimplySwords: Detected Mythic Metals - injecting compatibility init");
SimplySwords.init();
MythicMetalsCompat.registerModItems();
if (FabricLoader.getInstance().isModLoaded("gobber2")) {
GobberCompat.registerModItems();
}
}
Albeit this is kinda ugly and I'm not proficient enough in Java/Minecraft modding to contribute a better code fix
Hey there,
Good job finding the cause of the issue!
Without going into too much detail, this is a load order issue that only seems to present in Quilt.
I'll take a look at fixing this for the next version, as long as it doesn't break functionailty in any other loaders.