Alex Sim Posted July 20, 2019 Share Posted July 20, 2019 (edited) Hello everyone, I wanted to try making a mod using Kotlin, but Forgelin is completely trash: I couldn't get it to work on the latest Minecraft version. Instead I opted to include the full Kotlin runtime in my Jar using johnregelman's shadow Gradle plugin (relocating it to com.my.package.embedded.kotlin so it doesn't conflict with any other mod doing the same thing) I tried including it using the ContainedDeps manifest attribute (and yes, I put the Jars in META-INF/libraries), but it did not work, so this was my only option Edited July 20, 2019 by Alex Sim Quote Link to comment Share on other sites More sharing options...
rdvdev2 Posted August 17, 2019 Share Posted August 17, 2019 I found this Forgelin rewrite for 1.13.2+: https://www.curseforge.com/minecraft/mc-mods/kottle It will hopefully do the trick Quote Link to comment Share on other sites More sharing options...
Alex Sim Posted August 22, 2019 Author Share Posted August 22, 2019 On 8/17/2019 at 10:52 PM, rdvdev2 said: I found this Forgelin rewrite for 1.13.2+: https://www.curseforge.com/minecraft/mc-mods/kottle It will hopefully do the trick Thank you, but I just don't see why a minecraft-version-dependant framework is needed when Kotlin actually does work out of the box, the only extra step needed is adding the @JvmStatic annotation alongside @SubscribeEvent in static event handler's methods Quote Link to comment Share on other sites More sharing options...
rdvdev2 Posted August 23, 2019 Share Posted August 23, 2019 I think this is a better approach because forge doesn't have the kotlin runtime or standard library. Without a language provider like kottle every mod would have to shadow these libraries, so it's a better practice to have one mod to carry this libraries to avoid redundancy. This also allows the kotlin libs to update independently Quote Link to comment Share on other sites More sharing options...
Alex Sim Posted August 23, 2019 Author Share Posted August 23, 2019 (edited) 7 minutes ago, rdvdev2 said: I think this is a better approach because forge doesn't have the kotlin runtime or standard library. Without a language provider like kottle every mod would have to shadow these libraries, so it's a better practice to have one mod to carry this libraries to avoid redundancy. This also allows the kotlin libs to update independently Yeah, but what I'm saying is this mod doesn't have to be minecraft-version dependant (but it currently is) so using it would mean I depend on it to be updated for updating my mod, while I don't have to worry about that if I shadow the Kotlin runtime Edited August 23, 2019 by Alex Sim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.