
Create Minecraft datapacks via a type-safe DSL, generating functions, commands, NBT, recipes, worldgen, selectors, chat components, OOP gameplay helpers, macros, VFX pipelines, and mod-ready zips.
A Kotlin library to write Datapacks for Minecraft.
Check the website for the latest documentation.
LLM-friendly documentation: llms.txt | llms-full.txt AI Agents skills: Kore-Skill (optional skills pack for AI-assisted Kore work)
This library is compatible and made for Minecraft Java 1.20 and later versions, I don't think I will support older versions nor Bedrock Edition.
You can still create your own fork and make it compatible with older versions.
I will accept pull requests for older versions on a separate branch.
New on Kore ? Read the Getting Started guide to learn how to create your first datapack.
You can use the Kore Template to start a new project with Kore.
Or install one or more Kore modules by hand with Gradle. If you're starting a new datapack project, begin with the core
kore module.
With Kotlin DSL:
implementation("io.github.ayfri.kore:kore:VERSION")With Groovy DSL:
implementation 'io.github.ayfri.kore:kore:VERSION'For builds published automatically from every commit on master, add the Sonatype snapshots repository and use the same
version with the -SNAPSHOT suffix:
repositories {
mavenCentral()
maven("https://central.sonatype.com/repository/maven-snapshots/")
}
dependencies {
implementation("io.github.ayfri.kore:kore:VERSION-SNAPSHOT")
}You should also use Java 25 or higher:
kotlin {
jvmToolchain(25)
}Then create a Main.kt file and start writing your datapacks. See the documentation
for more information, including the Commands guide for all available
commands and the NBTs guide for the shared NBT builder DSL.
Kore is split into installable modules. Start with kore, then add the others only when you need their extra
abstractions or tooling.
io.github.ayfri.kore:kore:VERSION
io.github.ayfri.kore:oop:VERSION
io.github.ayfri.kore:helpers:VERSION
io.github.ayfri.kore:bindings:VERSION
fun main() {
val datapack = dataPack("test") {
function("display_text") {
tellraw(allPlayers(), textComponent("Hello World!"))
}
recipes {
craftingShaped("enchanted_golden_apple") {
pattern(
"GGG",
"GAG",
"GGG"
)
key("G", Items.GOLD_BLOCK)
key("A", Items.APPLE)
result(Items.ENCHANTED_GOLDEN_APPLE)
}
}
function("tp_random_entity_to_entity") {
val entityName = "test"
val entity = allEntities(limitToOne = true) {
name = entityName
}
summon(Entities.CREEPER, vec3(), nbt {
this["CustomName"] = textComponent("Hello World!")
})
execute {
asTarget(allEntities {
limit = 3
sort = Sort.RANDOM
})
ifCondition {
score(self(), "test") lessThan 10
}
run {
teleport(entity)
}
}
}
pack {
description = textComponent("Datapack test for ", Color.GOLD) + text("Kore", Color.AQUA) { bold = true }
}
}
datapack.generateZip()
}How to add your project to the list ?
Note: All APIs for commands, selectors, NBT tags, ... are public, so you can use them to create your own features.
website/.build/generated/kore/src/jsMain/kotlin during the build.AppEntry.kt initializes the Kobweb app, configures a custom Markdown renderer, and sets the site-wide error page via InitKobweb.kobwebExport Gradle task and placed under website/.kobweb/site/ for deployment.Prerequisites:
JAVA_HOME set.gradlew). Ensure it is executable on your platform.Kobweb CLI (recommended for local dev):
The Kobweb CLI provides a convenient development workflow for Kotlin/Kobweb projects. It runs a dev server with live reload and can export a static build.
Install the Kobweb CLI: See the official instructions on the Kobweb website: Kobweb CLI - Installation.
Run the dev server (live reload):
kobweb runhttp://localhost:8080 and watches Kotlin sources, Markdown content under website/src/jsMain/resources/markdown/, and static resources. Changes trigger rebuilds and browser reloads.website/.kobweb/conf.yaml.Export a static site:
kobweb exportwebsite/.kobweb/site/ and is suitable for deployment to static hosts.Gradle tasks (alternative):
If you prefer not to install the CLI, the Gradle tasks are still available:
./gradlew :website:kobwebStart -t # Run with live reload
./gradlew :website:kobwebStop # Stop the server
./gradlew :website:kobwebExport -PkobwebExportLayout=STATIC -PkobwebBuildTarget=RELEASE -PkobwebReuseServer=falseTroubleshooting:
If the dev server doesn't pick up generated Kotlin or Gradle config changes, restart the server.
To change the dev server port, edit website/.kobweb/conf.yaml or use the CLI configuration options.
If you see stale files, run ./gradlew :website:clean :website:build before restarting the dev server.
build/generated/kore/src/jsMain/kotlin and is created by Gradle tasks during the build; you generally do not need to commit those generated files.Check out the Known Issues page for a list of known issues and workarounds.
Want to contribute to Kore? Start with the Contributing to Kore guide and the repository-level Contribution guidelines.
If you use Cursor or similar tools, you can install the optional Kore-Skill skills pack for contributor- and user-focused guidance.
If you want to support the project, please consider donating !
This project is licensed under the GNU 3.0 License – see the LICENSE file for details.
A Kotlin library to write Datapacks for Minecraft.
Check the website for the latest documentation.
LLM-friendly documentation: llms.txt | llms-full.txt AI Agents skills: Kore-Skill (optional skills pack for AI-assisted Kore work)
This library is compatible and made for Minecraft Java 1.20 and later versions, I don't think I will support older versions nor Bedrock Edition.
You can still create your own fork and make it compatible with older versions.
I will accept pull requests for older versions on a separate branch.
New on Kore ? Read the Getting Started guide to learn how to create your first datapack.
You can use the Kore Template to start a new project with Kore.
Or install one or more Kore modules by hand with Gradle. If you're starting a new datapack project, begin with the core
kore module.
With Kotlin DSL:
implementation("io.github.ayfri.kore:kore:VERSION")With Groovy DSL:
implementation 'io.github.ayfri.kore:kore:VERSION'For builds published automatically from every commit on master, add the Sonatype snapshots repository and use the same
version with the -SNAPSHOT suffix:
repositories {
mavenCentral()
maven("https://central.sonatype.com/repository/maven-snapshots/")
}
dependencies {
implementation("io.github.ayfri.kore:kore:VERSION-SNAPSHOT")
}You should also use Java 25 or higher:
kotlin {
jvmToolchain(25)
}Then create a Main.kt file and start writing your datapacks. See the documentation
for more information, including the Commands guide for all available
commands and the NBTs guide for the shared NBT builder DSL.
Kore is split into installable modules. Start with kore, then add the others only when you need their extra
abstractions or tooling.
io.github.ayfri.kore:kore:VERSION
io.github.ayfri.kore:oop:VERSION
io.github.ayfri.kore:helpers:VERSION
io.github.ayfri.kore:bindings:VERSION
fun main() {
val datapack = dataPack("test") {
function("display_text") {
tellraw(allPlayers(), textComponent("Hello World!"))
}
recipes {
craftingShaped("enchanted_golden_apple") {
pattern(
"GGG",
"GAG",
"GGG"
)
key("G", Items.GOLD_BLOCK)
key("A", Items.APPLE)
result(Items.ENCHANTED_GOLDEN_APPLE)
}
}
function("tp_random_entity_to_entity") {
val entityName = "test"
val entity = allEntities(limitToOne = true) {
name = entityName
}
summon(Entities.CREEPER, vec3(), nbt {
this["CustomName"] = textComponent("Hello World!")
})
execute {
asTarget(allEntities {
limit = 3
sort = Sort.RANDOM
})
ifCondition {
score(self(), "test") lessThan 10
}
run {
teleport(entity)
}
}
}
pack {
description = textComponent("Datapack test for ", Color.GOLD) + text("Kore", Color.AQUA) { bold = true }
}
}
datapack.generateZip()
}How to add your project to the list ?
Note: All APIs for commands, selectors, NBT tags, ... are public, so you can use them to create your own features.
website/.build/generated/kore/src/jsMain/kotlin during the build.AppEntry.kt initializes the Kobweb app, configures a custom Markdown renderer, and sets the site-wide error page via InitKobweb.kobwebExport Gradle task and placed under website/.kobweb/site/ for deployment.Prerequisites:
JAVA_HOME set.gradlew). Ensure it is executable on your platform.Kobweb CLI (recommended for local dev):
The Kobweb CLI provides a convenient development workflow for Kotlin/Kobweb projects. It runs a dev server with live reload and can export a static build.
Install the Kobweb CLI: See the official instructions on the Kobweb website: Kobweb CLI - Installation.
Run the dev server (live reload):
kobweb runhttp://localhost:8080 and watches Kotlin sources, Markdown content under website/src/jsMain/resources/markdown/, and static resources. Changes trigger rebuilds and browser reloads.website/.kobweb/conf.yaml.Export a static site:
kobweb exportwebsite/.kobweb/site/ and is suitable for deployment to static hosts.Gradle tasks (alternative):
If you prefer not to install the CLI, the Gradle tasks are still available:
./gradlew :website:kobwebStart -t # Run with live reload
./gradlew :website:kobwebStop # Stop the server
./gradlew :website:kobwebExport -PkobwebExportLayout=STATIC -PkobwebBuildTarget=RELEASE -PkobwebReuseServer=falseTroubleshooting:
If the dev server doesn't pick up generated Kotlin or Gradle config changes, restart the server.
To change the dev server port, edit website/.kobweb/conf.yaml or use the CLI configuration options.
If you see stale files, run ./gradlew :website:clean :website:build before restarting the dev server.
build/generated/kore/src/jsMain/kotlin and is created by Gradle tasks during the build; you generally do not need to commit those generated files.Check out the Known Issues page for a list of known issues and workarounds.
Want to contribute to Kore? Start with the Contributing to Kore guide and the repository-level Contribution guidelines.
If you use Cursor or similar tools, you can install the optional Kore-Skill skills pack for contributor- and user-focused guidance.
If you want to support the project, please consider donating !
This project is licensed under the GNU 3.0 License – see the LICENSE file for details.