ejektaflex / Kambrik

A Lightweight Kotlin-Fabric Library
https://kambrik.ejekta.io/
10 stars 4 forks source link

1.20.1 version is crashing on servers. #21

Closed AzureDoom closed 1 year ago

AzureDoom commented 1 year ago
[18.07 18:28:48] [Server]   Mod File/mods/Kambrik-6.1.0+1.20.1-forge.jar
[18.07 18:28:48] [Server]   Failure messageKambrik (kambrik) has failed to load correctly
[18.07 18:28:48] [Server]       java.lang.ExceptionInInitializerErrornull
[18.07 18:28:48] [Server]   Mod Version6.1.0+1.20.1
[18.07 18:28:48] [Server]   Mod Issue URLhttps://github.com/ejektaflex/Kambrik/issues
[18.07 18:28:48] [Server]   Exception messagejava.lang.RuntimeException: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER
ejektaflex commented 1 year ago

Hi @AzureDoom , This isn't enough of the log for me to diagnose the problem. I tested it on a server before releasing, so in this state I can't reproduce it, and as such I need a full stack trace to see what's happening.

ejektaflex commented 1 year ago

crash-2023-07-19_11.23.14-fml.txt

I took some time to replicate this and found that it crashes in a Forge server environment but not Fabric. This is because of "Kotlin for Forge" doing mod reflection when constructing itself and catching an unused (client-only) API method, which I'll have to move to a separate package. I'll try get this done today.

ejektaflex commented 1 year ago

This is fixed in Kambrik 6.1.1, which has been uploaded to Modrinth and CurseForge (pending review).