About Kotlin for Forge
Kotlin for Forge is a mod that lets developers create Minecraft mods using Kotlin. It includes shaded Kotlin libraries and tools for loading mods and handling events. The mod supports Minecraft versions 1.14 to 26.3, with versions 26.3, 26.2, and 26.1.x being current. It works with both Forge and NeoForge loaders.
The mod adds KotlinLanguageProvider to load @Mod declarations and AutoKotlinEventBusSubscriber for event handling. It also includes Kotlin coroutines, JSON serialization, and utility functions. These features help streamline mod development by providing ready-to-use tools and libraries.
Best suited for mod developers looking to use Kotlin instead of Java. It's especially useful for those needing the Kotlin libraries without full language support. In modpacks, it serves as a foundational dependency for Kotlin-based mods.
This mod integrates smoothly with existing modpacks by acting as a dependency. Its optional client/server sides mean it can be included without affecting gameplay for non-developers. Developers can use it for libraries or its event tools without requiring other mods.
Features
- Provides Kotlin 1.4.21 with coroutines 1.4.2 and JSON serialization 1.0.1
- Includes Jetbrains annotations 20.1.0 for code enhancements
- Features custom IEventBus with addListener and addGenericListener support
- Supports Minecraft versions 1.14 through 26.3 (including 26.1.x)
- Works with both Forge and NeoForge loaders
- Optional client and server-side installation for modpack flexibility
Tips
- Use it primarily for Kotlin libraries if you don't need language features
- Check Minecraft version compatibility with your modpack's target version
- Join the Discord for support if you're new to Kotlin modding
- Combine with other Kotlin-based mods for consistent development tools
How to install
- Install Forge / NeoForge for your Minecraft version (use the official installer).
- Download the file that matches your Minecraft version and Forge / NeoForge.
- Open the .minecraft folder and put the file into the "mods" folder (create it if missing).
- Launch Minecraft with the Forge / NeoForge profile.
FAQ
Does Kotlin for Forge require other mods?
No, it has no required dependencies and works standalone.
Can it be used with Minecraft 1.21.11?
Yes, it supports up to 1.21.11 along with 26.3 and 26.2.
Is the Kotlin loader mandatory to use?
No, you can use bundled libraries without the language loader.