Kotlin for Forge

A library that lets Forge/NeoForge mods be written in Kotlin. If you're not a mod developer, it's just a dependency.

📖 Introduction

Kotlin for Forge is a library by thedarkcolour. To quote its own page: it's used to make mods with the Kotlin programming language — and if you're not a mod developer, this is a dependency mod.

What it provides - Shaded Kotlin libraries — it bundles Kotlin itself, coroutines, JSON serialization, and JetBrains annotations, so multiple Kotlin mods don't each have to ship their own. - KotlinLanguageProvider — lets Forge load @Mod written as a Kotlin object declaration. - AutoKotlinEventBusSubscriber — registers @EventBusSubscriber declarations written in Kotlin. - Its own IEventBus implementation — supporting addListener and addGenericListener with function references. The mod page frames this as the difference from Kottle, a comparable library.

You don't have to use all of it. The page notes you can skip the language loader entirely and just use the bundled Kotlin libraries.

What Kotlin is — a JetBrains language that runs on the same JVM as Java and interoperates with Java code.

As a library mod it adds nothing in-game. It comes along whenever a pack contains a mod written in Kotlin.

🕒 When to Use This Mod

Needed whenever a pack contains a mod written in Kotlin. Nothing for a user to operate.

📦 Where It Matters Most

Forge and NeoForge packs that include Kotlin-based mods.

🚀 Getting Started — First 30 Minutes

Step 1 — Check whether your pack includes it. Packs with Kotlin mods normally do.

Step 2 — Make sure the build matches your loader. On 1.21.8 and below, Forge and NeoForge builds are separate. From 1.21.9 up (the 6.x line), only a NeoForge build is published.

Step 3 — Leave it alone. There's nothing to configure.

💡 Gameplay Tips

  • Don't remove it. If even one mod requires it, that mod won't load without it.
  • Nothing to configure. It's a library; there's no user-facing surface.
  • One copy covers any number of Kotlin mods — it shades the Kotlin libraries so they aren't duplicated.

⚠️ Common Confusing Points

  • • 'Nothing happens' is correct. As a library it adds no in-game content.
  • • The name says "for Forge," but current builds are NeoForge-only. Through the 5.x line (MC 1.20.6–1.21.8) there were separate Forge and NeoForge builds; 6.x, which covers 1.21.9 onward, ships only for NeoForge. The author's README says "Forge support Not yet implemented," and the Forge dependency line in the build instructions is commented out. If you're on an older instance with a Forge build, that build is still correct for it.

❓ FAQ

What is Kotlin?

A JetBrains programming language. It runs on the same JVM as Java and interoperates with Java code, which is what makes writing Forge mods in Kotlin possible.

Why is this mod in my pack?

Because some mod in it was written in Kotlin and needs this library to load. Which one, you'd have to check against the pack's mod list.

Can I remove it?

Not if anything requires it — that mod would stop loading.

📦 Modpacks With This Mod