Skip to content
AugustoMegener edited this page Jul 16, 2026 · 1 revision

Setting up a project and setting up Kore

Kore is a framework for Neoforge, so the first step is to create a Neoforge project.

Creating a Neoforge project

There are a few alternatives for starting a Neoforge project

  • Intellij's Minecraft Development (recommended). If you use Intellij IDEA, you can generate a Neoforge project directly in the IDE!
    1. Go to the plugin store (File>Settings>Plugins>Marketplace>Marketplace).
    2. Search for "Minec1raft Development" and install the plugin.
    3. Restart the IDE.
    4. Open the project creation page (File>New>Project).
    5. Scroll the sidebar until you find the "Minecraft" option and select it.
    6. Select "Neoforge", select "Kotlin" and select version 1.21.10
    7. Fill in the remaining fields and click "Create"
  • Neoforge's Mod generator.
    1. Go to the Mod Generator.
    2. Select version 1.21.10.
    3. Fill in the remaining fields.
    4. Click "Download mod project".
    5. Extract the zip and open the project in your editor of choice
  • MDK Templates.
    1. Choose the template between ModDevGradle and NeoGradle.
    2. Click "Use this Template".
    3. Fill in the fields and click Create Repository.
    4. Clone the repository to your machine and open the project in your editor of choice
  • From scratch.
    1. Start a new Gradle project.
    2. Choose between ModDevGradle and NeoGradle.
    3. Follow the setup of the chosen plugin.

KotlinForForge setup

(This step is not necessary if you did the setup using the Minecraft Development plugin and selected "Kotlin".)

KotlinForForge is a library necessary for the use of the Kotlin language in Neoforge projects, its setup is simple:

1. Add the Kotlin plugin in your project's build.gradle

./build.gradle

plugins {
    // ...
    id 'org.jetbrains.kotlin.jvm' version '2.2.20'
}

or

./build.gradle.kts

plugin {
    // ... 
    kotlin("jvm") version "2.2.0"
}

2. Add the KFF Maven repository

./build.gradle

repositories {
    // ...
    maven {
        name = "Kotlin for Forge"
        url = "https://thedarkcolour.github.io/KotlinForForge/"
    }
}

or

./build.gradle.kts

repositories {
    // ...
    maven {
        name = "Kotlin for Forge"
        setUrl("https://thedarkcolour.github.io/KotlinForForge/")
    }
}

3. Add KFF as a dependency

./build.gradle

dependencies {
    // ...
    implementation "thedarkcolour:kotlinforforge-neoforge:6.0.0"
}

or

./build.gradle.kts

dependencies {
    // ...
    implementation("thedarkcolour:kotlinforforge-neoforge:6.0.0")
}

4. Change the mod loader

./src/main/resources/META-INF/neoforge.mods.toml

modLoader="kotlinforforge"
# ...

5. Rename src/main/kotlin/ and remove its .java files

Rename the folder and remove all .java files, add src/main/kotlin/modgroup/modid/ModId.kt, we'll use it later

Done! Your project is ready to handle kotlin code!

Kore setup

After making sure we have KFF as a dependency of our project, we can add Kore!

1. Add the KSP plugin

This is necessary to generate the mod's entrypoint

./build.gradle

plugins {
    // ...
    id 'org.jetbrains.kotlin.jvm' version '2.2.20'
    id 'com.google.devtools.ksp' version '2.2.21-2.0.4'
}

or

./build.gradle.kts

plugin {
    // ... 
    kotlin("jvm") version "2.2.0"
    id("com.google.devtools.ksp") version "2.2.21-2.0.4"
}

2. Add the Kore Maven repository

./build.gradle

repositories {
    // ...
    maven {
        name = "Kotlin for Forge"
        url = "https://thedarkcolour.github.io/KotlinForForge/"
    }
    maven {
        name = "Kore"
        url = "https://augustomegener.github.io/Kore/"
    }
}

or

./build.gradle.kts

repositories {
    // ...
    maven {
        name = "Kotlin for Forge"
        setUrl("https://thedarkcolour.github.io/KotlinForForge/")
    }
    maven {
        name = "Kore"
        setUrl("https://augustomegener.github.io/Kore/")
    }
}

3. Add Kore as a dependency and the KSP processor

./build.gradle

dependencies {
    // ...
    implementation "thedarkcolour:kotlinforforge-neoforge:6.0.0"
    implementation "augustomegener:Kore:<Lastest Version>"
    ksp "augustomegener.kore:ksp:<Lastest Version>" 
}

or

./build.gradle.kts

dependencies {

    implementation("thedarkcolour:kotlinforforge-neoforge:6.0.0")
    implementation("augustomegener:Kore:<Lastest Version>")
    ksp("augustomegener.kore:ksp:<Lastest Version>")
}

4. Add Kore as a dependency

./src/main/resources/META-INF/neoforge.mods.toml

# ...
[[dependencies.${mod_id}]]
    modId="kore"
    type="required"
    versionRange="[0.1.0,)"
    ordering="NONE"
    side="BOTH"

5. Add the entrypoint

src/main/kotlin/modgroup/modid/ModId.kt

@KMod
fun init() {
    
}

Done! Your project is ready for development with Kore!