KotlinLangForge

Quick rating

KotlinLangForge

No reviews yet

Provides a Kotlin language adapter for Forge and Neoforge

No Theme
No Genre
API/Library
Mod Loaders
Forge
NeoForge
Minecraft
26.2

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Optional
Server Optional

About

Project Details

Type
Mod
License
GNU General Public License v3.0 only
Latest Version
v2.12.2-k2.4.10-3.1+neoforge
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

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.12.1-k2.4.10-$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.10
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.4.10
  • org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.4.10
  • org.jetbrains.kotlin:kotlin-reflect:2.4.10
  • org.jetbrains.kotlinx:kotlinx-serialization-core:1.9.0
  • org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0
  • org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.9.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2
  • org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.10.2
  • org.jetbrains.kotlinx:kotlinx-datetime:0.7.1-0.6.x-compat
  • org.jetbrains.kotlinx:kotlinx-io-core:0.8.0
  • org.jetbrains.kotlinx:kotlinx-io-bytestring:0.8.0
  • org.jetbrains.kotlinx:atomicfu:0.29.0

Other

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

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.12.2-k2.4.10-$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.10
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.4.10
  • org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.4.10
  • org.jetbrains.kotlin:kotlin-reflect:2.4.10
  • org.jetbrains.kotlinx:kotlinx-serialization-core:1.9.0
  • org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0
  • org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.9.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2
  • org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.10.2
  • org.jetbrains.kotlinx:kotlinx-datetime:0.7.1-0.6.x-compat
  • org.jetbrains.kotlinx:kotlinx-io-core:0.8.0
  • org.jetbrains.kotlinx:kotlinx-io-bytestring:0.8.0
  • org.jetbrains.kotlinx:atomicfu:0.29.0

Other

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

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~960,000
Total Downloads
CurseForge
~310,000
Modrinth
~650,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works