Rethink your datapack development experience withKore

Kore is a modern, open-source, and easy-to-use Kotlin library for Minecraft datapack development. You can use it to create your own Minecraft Datapacks, and without the need to write a single line of JSON or MCFunction.

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()
}
Kotlin
architecture

Modern

Write datapacks for recent Minecraft versions with a modern programming language leveraging Kotlin features for robust code.

data_object

Easy to use

Intuitive API and abstractions over vanilla minimize complexity for simple datapack development.

group_add

Open Source

Active community and contributions provide freedom and support for any open source project.

fun myDatapack() = dataPack("my_datapack") {
	function("test") {
		say("Hello World!")
	}

	function("gamemode_creative") {
		gamemode(Gamemode.CREATIVE)
		tellraw(
			targets = allPlayers(),
			message = "You are now in creative mode!",
			color = Color.GREEN
		)
	}
}
Kotlin

Simple APIs

Kore provides simple and intuitive APIs to create Minecraft datapacks and call commands. Almost all the lists from the game are available as enums, so you are always sure to use the right value.

import myproject.constants.myScore
import myproject.functions.myFunction
import myproject.predicates.myPredicate

fun myDatapack() = dataPack("my_datapack") {
	function("execute_my_function") {
		execute {
			ifCondition(myPredicate)

			run {
				function(myFunction)
				scoreboard.player(self()) {
					add(myScore, 1)
				}
			}
		}
	}
}
Kotlin

Perfect for big projects

Kore is perfect for big projects, as it allows you to split your code into multiple files and use the full power of Kotlin to manage your code.

fun myDatapack() = dataPack("my_datapack") {
	val myRecipe = recipesBuilder.smithingTransform(
		name = "diamond_to_netherite"
	) {
		template(Items.DIAMOND_BLOCK)
		base(Items.DIAMOND_SWORD)
		addition(Items.NETHERITE_INGOT)
		result(Items.NETHERITE_SWORD)
	}

	function("give_recipe") {
		recipe(allPlayers()).give(myRecipe)
	}
}
Kotlin

JSON-less

By using Kore, you don't have to write a single line of JSON ever. You only have one language to learn and maintain. Feature-complete code completion and documentation are available in your IDE.

fun myDatapack() = dataPack("my_datapack") {
	function("kore_is_great") {
		advancement(allPlayers {
			gamemode = !Gamemode.CREATIVE
			nbt = nbt {
				this["using_kore"] = true
			}
		}) {
			grant(Advancements.Story.SHINY_GEAR)
		}

		playSound(
			sound = Sounds.Block.EnchantmentTable,
			source = PlaySoundSource.MASTER,
			target = allEntities()
		)
	}
}
Kotlin

Type-safe

We crafted generators for douzens of Minecraft lists, so you can be sure to use the right value at the right place. No more typos in your commands, JSON files, or functions.

Frequently Asked Questions

Yes, Kore is compatible with all Minecraft versions from 1.20 to the latest version.

Yes, you can use other datapacks with Kore. By providing bindings for your datapacks, you can use them in your Kore code.

Kore is a modern, open-source, and easy-to-use Kotlin library for Minecraft datapack development. You can use it to create your own Minecraft Datapacks, and without the need to write a single line of JSON or MCFunction. You'll have great, precise, and fast code completion, and you'll be able to use the full power of Kotlin to manage your code. Furthermore, you can even create libraries to help you or others develop datapacks.

Yes, Kore's API is complete. It provides simple and intuitive APIs to create Minecraft datapacks and call commands. All the common lists from the game are available as enums, so you are always sure to use the right value.

By providing APIs for creating your own commands/features, you can use Kore with mods. However, Kore is not compatible with mods directly.

Build your first datapack in Kotlin

Craft your first datapack with Kore, and enjoy the power of Kotlin for Minecraft development.

Get Started