KotlinLangForge

KotlinLangForge

Provides a Kotlin language adapter for Forge and Neoforge

by
1.3M Downloads
forgeneoforgelibrary
Rent Server with this Mod

About this Mod

KotlinLangForge

Provides a Kotlin language adapter for Forge and Neoforge

This mod adds a language adapter for Kotlin and provides multiple libraries.

Developer usage

To add your language adapter to your mod, add the following lines to your
(neoforge.)mods.toml.

neoforge.mods.toml

modLoader = "klf"
loaderVersion = "[1,)"

Now you can init your mod like any other.
Just make sure your @Mod class is either an object or a class with a public constructor.
The constructor can take the following four arguments (they should never duplicate):

  • IEventBus
  • ModContainer
  • KotlinModContainer
  • Dist

If you want to implement the libraries in your mod, import the following dependency,
matching the language provider version, your loader and the (latest) version of Kotlin.

Versioning

The "language provider version" is a version only provided by KotlinLangForge.
This format is not used by Forge or NeoForge and only serves as a simple differentiation variable between the different
language provider implementations over the course of the versions of Minecraft.

version of Minecraft language provider version supported loaders
1.16.5 1.0 Forge
1.17.1 - 1.20.4 2.0 Forge, NeoForge
1.20.5 - 1.21.8 3.0 NeoForge
1.21.9 - 26.x 3.1 NeoForge

build.gradle.kts

repositories {
    maven("https://repo.nyon.dev/releases")
}

dependencies {
    implementation("dev.nyon:KotlinLangForge:2.14.1-k2.4.20-$lpVersion+$loader")
}

For lp: <=3.0, you will have to use modImplementation.

Events

To use automatic event listener registration, the @EventBusSubscriber annotation has to be added on the class/file.
Klf then will automatically find all methods that have events in their parameters and will determine which event bus to
use.
Additionally, you can annotate a method with @SubscribeEvent to adjust the listener's parameters.

Note for Forge developers: Private event listeners cannot be processed on Forge and will result in a crash!

Mod Bus: The mod bus is available via the top-level declaration dev.nyon.klf.MOD_BUS.

Included Libraries

  • org.jetbrains.kotlin:kotlin-stdlib:2.4.20
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.4.20
  • org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.4.20
  • org.jetbrains.kotlin:kotlin-reflect:2.4.20
  • org.jetbrains.kotlinx:kotlinx-serialization-core:1.11.0
  • org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0
  • org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.11.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.11.0
  • org.jetbrains.kotlinx:kotlinx-datetime:0.8.0-0.6.x-compat
  • org.jetbrains.kotlinx:kotlinx-io-core:0.9.1
  • org.jetbrains.kotlinx:kotlinx-io-bytestring:0.9.1
  • org.jetbrains.kotlinx:atomicfu:0.33.0

Other

If you need help with any of my mods, just join my discord server.

Available Versions

v2.15.0-k2.4.20-3.1+neoforgerelease
MC 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3neoforge
October 7, 2026
v2.15.0-k2.4.20-3.0+neoforgerelease
MC 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8neoforge
October 7, 2026
v2.15.0-k2.4.20-2.0+neoforgerelease
MC 1.20.2, 1.20.3, 1.20.4neoforge
October 7, 2026
v2.15.0-k2.4.20-2.0+forgerelease
MC 1.17.1, 1.18.2, 1.19.2, 1.19.4, 1.20.1, 1.20.2, 1.20.3, 1.20.4forge
October 7, 2026
v2.14.1-k2.4.20-3.1+neoforgerelease
MC 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3neoforge
September 16, 2026

How to Install KotlinLangForge on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set forge Loader

In the panel under "Egg", select the forge loader and matching Minecraft version (26.3).

3

Install Mod

Open the mod browser in the dashboard and search for "KotlinLangForge". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

forgeneoforge

Minecraft Versions

26.3, 26.2, 26.1.2 (+55 more)

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

KotlinLangForge server crashes on startup – what to do?

Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.3). You can switch loaders with one click in the panel.

Is KotlinLangForge compatible with forge and neoforge?

KotlinLangForge officially supports forge, neoforge for Minecraft 26.3, 26.2, 26.1.2. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with KotlinLangForge – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if KotlinLangForge consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install KotlinLangForge with just one click on your server.

Recommended RAM
4 GBfrom €5.2/mo
Minimum 3 GB | per 8 players
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU General Public License v3.0 only
Server-side
Optional

Supported Versions

26.326.226.1.226.1.2-rc-126.2-snapshot-126.1.126.1.1-rc-126.126.1-rc-326.1-rc-2+48 more