autaut03 / kottle

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

Classloading errors #3

Closed Bluexin closed 4 years ago

Bluexin commented 5 years ago

We have noticed some class loading errors caused by the wrong class loader being used. Just posting the issue here for the record, I'll look into this myself in the evening (with a simple reproducer), and either provide a PR or more details for reproducing the error if I don't have the time to fix it myself.

autaut03 commented 5 years ago

Hey. Sure, I'll be happy to look into it. However, just to potentially save you time, I will have to warn you that if you get java.lang.ClassCastException: net.alexwells.kottle.FMLKotlinModContainer cannot be cast to net.minecraftforge.fml.ModContainer then it's a problem on your side, and you have to drop the mod jar into respective folder, even in dev env.

Otherwise, ignore this.

Bluexin commented 5 years ago

No, it's an issue with actual class loading (as the same class loaded by two different class loaders gives two non identical classes for obvious reasons).

autaut03 commented 5 years ago

Hey. Any updates on this?

Bluexin commented 5 years ago

Sorry, I got caught up in other stuff and forgot about this.

MairwunNx commented 5 years ago

@autaut03 I am updating the discussion. I got java.lang.ClassCastException: net.alexwells.kottle.FMLKotlinModContainer cannot be cast to net.minecraftforge.fml.ModContainer, it would be interesting to know how to fix this, I run the client through runners (gradle tasks).

autaut03 commented 5 years ago

@autaut03 I am updating the discussion. I got java.lang.ClassCastException: net.alexwells.kottle.FMLKotlinModContainer cannot be cast to net.minecraftforge.fml.ModContainer, it would be interesting to know how to fix this, I run the client through runners (gradle tasks).

Hey. Have you put the gradle.config from readme into your gradle.config? After running the client once, is there a Kottle-1.1.1.jar in mods folder?

MairwunNx commented 5 years ago

A couple of minutes ago I fixed it after reading readme. Issue resolved by adding tasks installMods.