-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the Boxlin wiki! Here you can read about Boxlin and was it does to make your mods be able to run with Kotlin in Forge.
There has been two different versions as the Forge Language Provider API has also changed twice. With the version it became more powerful and made more things possible. Version 1 is for Forge versions until 1.12.2 and version 3 for 1.14 and above.
For either version there is a header in the side where more information can be found.
The adapter should be used if you want your entry point to be a Kotlin object instead of a class, but all other Java methods still work.
import io.opencubes.boxlin.Boxlin
@Mod(/* ..., */ modLanguageAdapter = Boxlin.ADAPTER, modLanguage = "kotlin")
object MyMod {
// ...
}The provider can initialize your mod with either as a class, object, or as a function.
import net.minecraftforge.fml.common.Mod
@Mod("examplemod")
class ExampleMod {
init {
// Your init code like registering event listeners
}
}import net.minecraftforge.fml.common.Mod
@Mod("examplemod")
object ExampleMod {
init {
// Your init code like registering event listeners
}
}import io.opencubes.boxlin.adapter.FunctionalMod
@FunctionalMod("examplemod")
fun exampleMod() {
// Your init code like registering event listeners
}Version 2 is in a perpetual alpha state. It was first made for 1.13, but abandoned.
Forgelin is also a project that that provides a Kotlin language adapter. The project is for Minecraft versions until 1.13. This and Forgelin should be inter compatible and should be able to exist at the same time.