KotlinLangForge
by btwonion
KotlinLangForge lets mods written in Kotlin load on Forge and NeoForge through a language adapter, and bundles several Kotlin libraries.
What it does
The mod supplies a Kotlin language adapter that Forge and NeoForge use when a mod declares it in its mods.toml file. A @Mod class can be written as a Kotlin object, or as a class exposing a constructor, and that constructor may take the four supported arguments, none of them repeated. The adapter also exposes a mod bus through a top-level declaration in the dev.nyon.klf package.
Event handling follows the usual Forge model. Annotating a file or class with @EventBusSubscriber lets the mod find every method whose parameters are events and pick the matching event bus, and @SubscribeEvent adjusts the parameters of an individual listener. The mod requires Preloading Tricks, and its bundled Kotlin libraries include kotlin-stdlib, kotlin-reflect and kotlinx-serialization-core. KotlinLangForge is open source under the GNU General Public License v3.0 only, and it is published for Forge and NeoForge across 34 release versions, 1.16.3 – 26.3.
Key features
Kotlin language adapter
Mods declare the adapter in mods.toml, and their @Mod class is loaded from Kotlin source.
Automatic event registration
A file annotated with @EventBusSubscriber has its event methods registered without manual bus calls.
Bundled Kotlin libraries
The standard library, reflection and kotlinx-serialization-core ship with the mod at fixed versions.
Mod bus access
A top-level declaration provides the mod event bus to Kotlin code in any file.
Compatibility
Latest build for each game version and loader.
26.x5 of 5 versions with builds
1.21.x12 of 12 versions with builds
1.20.x7 of 7 versions with builds
1.19.x4 of 4 versions with builds
1.18.x2 of 2 versions with builds
1.17.x1 of 1 version with builds
1.16.x3 of 3 versions with builds
This mod also publishes snapshot builds. Snapshots are not shown in the matrix.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Required by 28 mods
Use cases
Who it’s for: Mod developers who write Forge or NeoForge code in Kotlin, and players who run mods that depend on this library.
How it compares
Kotlin for Forge is open source under the GNU Lesser General Public License v2.1 only, for Forge and NeoForge, and it covers 1.14 – 26.3. Its environment works on either side, and neither side needs it. Kotlin for Forge Unofficial Extended Support is Forge only, open source under the same license, and covers 1.14 – 1.16.5. GroovyModLoader (GML) is open source under the MIT License, for Forge and NeoForge, covers 1.19.4 – 1.21, and works on either side, so neither side needs it.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| KotlinLangForge | Forge and NeoForge | 1.16.3 – 26.3 | Client or server, optional | 2026-10-08 |
| Kotlin for Forge | Forge and NeoForge | 1.14 – 26.3 | Client or server, optional | 2026-10-10 |
| Kotlin for Forge Unofficial Extended Support | Forge | 1.14 – 1.16.5 | Not published | 2025-04-18 |
| GroovyModLoader (GML) | Forge and NeoForge | 1.19.4 – 1.21 | Client or server, optional | 2024-11-14 |
Questions
Does KotlinLangForge need Preloading Tricks?
Which loader does a Kotlin mod need for this library?
Does a server need KotlinLangForge installed?
In the catalog
KotlinLangForge is one of 3,514 Library mods on ModsFinder, and one of 1,576 Library mods for Forge. 8,071 mods support Minecraft 26.3.
More from btwonion
Similar mods
What the author says
This mod adds a language adapter for Kotlin and provides multiple libraries. To add your language adapter to your mod, add the following lines to your (neoforge.)mods.toml.
Official listing
- Modrinth page
- modrinth.com/mod/kotlin-lang-forge
- Owner
- btwonion
- Published
- 2024-09-13
- Updated on Modrinth
- 2026-10-08
- Facts verified
- 2026-10-15
