Source-checkedGameplay & overhauls

KotlinLangForge

by btwonion · for Minecraft

Provides a Kotlin language adapter for Forge and Neoforge

1.6MDownloads
6d agoLast updated
GPL-3.0-onlyLicense
Forge · NeoForgeLoaders

About KotlinLangForge

From Modrinth

Provides a Kotlin language adapter for Forge and Neoforge

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.16.0-k2.4.21-$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.21
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.4.21
  • org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.4.21
  • org.jetbrains.kotlin:kotlin-reflect:2.4.21
  • org.jetbrains.kotlinx:kotlinx-serialization-core:1.12.0
  • org.jetbrains.kotlinx:kotlinx-serialization-json:1.12.0
  • org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.12.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.

Highlights

From source data

Game versions

Supports 58 Minecraft versions, the newest being 26.3.

Loaders

Runs on Forge and NeoForge.

Footprint

Rated a light load on a server.

KotlinLangForge on Nxeon

From our catalogue
One-click install
Supported on Nxeon Minecraft servers. We download it from Modrinth, place it, and restart the server.
Server side
Optional on the server
Server type needed
Forge, NeoForge
Server load
light
Smallest plan we suggest
Minecraft — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
2.17.0-k2.4.21-3.1+neoforge, released 2026-10-29

Game versions by loader

LoaderGame versionsNewest
NeoForge1.20.2 to 26.3 (22 versions)26.3
Forge1.17.1 to 1.20.4 (8 versions)1.20.4

From 21 recorded builds of KotlinLangForge.

Recent builds

BuildReleasedGame versionsLoaders
2.17.0-k2.4.21-3.1+neoforge2026-10-291.21.9 to 26.3 (8 versions)NeoForge
2.17.0-k2.4.21-3.0+neoforge2026-10-291.20.5 to 1.21.8 (11 versions)NeoForge
2.17.0-k2.4.21-2.0+neoforge2026-10-291.20.2 to 1.20.4 (3 versions)NeoForge
2.17.0-k2.4.21-2.0+forge2026-10-291.17.1 to 1.20.4 (8 versions)Forge
2.16.0-k2.4.21-3.1+neoforge2026-10-201.21.9 to 26.3 (8 versions)NeoForge
2.16.0-k2.4.21-3.0+neoforge2026-10-201.20.5 to 1.21.8 (11 versions)NeoForge

Dependencies

  • Required: modrinth project FFeAJNCx (modrinth, not in our catalogue)

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run KotlinLangForge on a Minecraft server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Modrinth as “Mods”

Gameplay & overhauls

New mechanics, content and overhauls that change how the game plays.

Works on a server

From source side support

Modrinth lists server-side support for KotlinLangForge as optional: it can run on a server, but isn’t required there.

Compatibility

Game
Minecraft
Loaders
ForgeNeoForge
Runs on
Serveroptional on the server
Game versions
26.3 and 57 earlier

Verified at the source

  • ✓ModrinthOfficial listing, checked 2026-10-30Open ↗
  • ✓Authorbtwonion, as published on Modrinth
  • ✓LicenseGPL-3.0-onlyFree

KotlinLangForge, answered

Generated from the mod’s own source data.

Do my players need to install KotlinLangForge?

Modrinth lists server-side support for KotlinLangForge as optional: it can run on a server, but isn’t required there.

Which loaders does it support?

Forge and NeoForge.

Is it free?

Yes. KotlinLangForge is free to download from Modrinth. Its license is GPL-3.0-only.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run KotlinLangForge on a Minecraft server.

Deploy in about a minute from $4.99 a month, then add KotlinLangForge in one click.