autaut03 / kottle

Kotlin language provider for Forge 1.13.2+
GNU Lesser General Public License v3.0
30 stars 13 forks source link

[TESTS REQUIRED] Try to fix No BuiltInsLoader implementation exception. #9

Closed MairwunNx closed 5 years ago

MairwunNx commented 5 years ago

It is very important to test on existing modifications built with Kottle!

The changes to this Pull Request helped me fix the exception IllegalStateException with a no implementation message for the BuiltInsLoaderImpl class.

autaut03 commented 5 years ago

modClass::class will return an instance of java.lang.Class, which isn't a mod instance. This will break methods matches and getMod of the FMLKotlinModContainer, which break calls in Forge itself:

https://github.com/MinecraftForge/MinecraftForge/blob/1.14.x/src/main/java/net/minecraftforge/fml/ModList.java#L150 https://github.com/MinecraftForge/MinecraftForge/blob/1.14.x/src/main/java/net/minecraftforge/fml/ModList.java#L156