Pierre Roy
All articles

Datapack Generators

A modern overview of datapack generators and why Kore stands out for ambitious projects.

Datapack Generators
Contents

Datapacks stopped being a pile of handwritten JSON a while ago. Minecraft now ships several versions a year, each adding registries (timeline, world_clock) and more item components, and keeping a big pack in sync by hand is fragile and slow. That is why packs are increasingly built with datapack generators, tools that treat a pack like software (Rationale - Beet documentation).

This article compares the main code-based tools: Kore, Sandstone, Beet and StewBeet, and JMC. I wrote Kore, so I put it first and I am biased, but the other sections only claim what their own docs say.

(If you only need a few simple JSON files, Misode's generators are still the quickest way.)

Tool Language What it is
Kore Kotlin A typed DSL for commands, functions and every datapack file, built with Gradle
Sandstone TypeScript A library for datapacks and resource packs, built with npm
Beet Python A toolchain and plugin system for data packs and resource packs
StewBeet Python A set of Beet plugins that write the files behind custom items and blocks
JMC its own .jmc language A language that compiles to mcfunction

Kore, a Kotlin Datapack Generator

Kore is an open-source Kotlin library that turns a datapack into a software project: a typed DSL, readable builders, and generated Minecraft JSON and functions. You write Kotlin, run it, and get the pack.

Why I use it

  • Type safety: Kotlin typing catches invalid tags, misspelled components and wrong registry keys at compile time, with autocomplete.
  • Broad coverage: commands, functions, macros, predicates, loot tables, recipes, advancements, worldgen, dialogs, item components, timelines. A new Minecraft version gets a new Kore release, versioned like 2.28.0-26.3 (Kore version, then Minecraft version).
  • Built-in helpers: scheduler, inventory manager, display entities, mannequins, scoreboard utilities. Repetitive patterns are already modeled.
  • Checks before writing: Kore validates the pack and fails the build on a mistyped command, a missing function or a broken tag, instead of letting the game skip it silently.
  • Flexible outputs: .generate() writes a folder, .generateZip() a ZIP and .generateJar() a mod JAR.
  • Import: experimental bindings turn an existing datapack into Kotlin code.
  • Requirements: JDK 25 and a Kotlin setup, as in the getting started guide.

Minimal example

fun main() {
	dataPack("example") {
		function("display_text") {
			tellraw(allPlayers(), textComponent("Hello World!"))
		}
	}.generateZip()
}

Example: item components without the JSON pain

val midasSword = Items.GOLDEN_SWORD {
	customName(textComponent("Midas Sword", Color.GOLD))
	attackRange(maxReach = 5f, hitboxMargin = 0.5f)
	weapon(itemDamagePerAttack = 2, disableBlockingForSeconds = 5f)
	customData {
		this["kore_rpg"] = nbt {
			this["id"] = "midas_sword"
			this["tier"] = 5
		}
	}
}

Example: a timeline that animates the sky

val overworldClock = WorldClockArgument("overworld")

timeline("blood_moon_cycle", clock = overworldClock) {
	periodTicks = 24000

	track(EnvironmentAttributes.Visual.SKY_COLOR, InOutCubic) {
		keyframe(6000) { value(rgb(0x87CEEB)) }
		keyframe(12000) { value(rgb(0xFF4500)) }
		keyframe(18000) { value(rgb(0x8B0000)) }
		keyframe(23000) { value(rgb(0x87CEEB)) }
	}
}

Already using another tool?

Kore does not ask you to throw everything away. Keep your asset pipeline (Beet or StewBeet), import existing datapacks with the bindings, and move your critical logic to Kotlin step by step.

Why Kore suits big projects

  • Local changes: renaming a function, a score or a registry key is a Kotlin refactor, and the compiler shows every place that breaks. In JSON the same rename fails silently in the game.
  • Optimization passes: Kore can prune dead functions, shorten execute chains and sort selectors before writing the pack.
  • A normal development loop: Gradle, code review, CI and tests work as for any Kotlin project, and the Gradle plugin copies the pack into your worlds and reloads a running server on every change.

(Documentation and examples: the Kore site and the Kore docs.)

Sandstone, a TypeScript Datapack Framework

Sandstone is a TypeScript library for datapacks and resource packs. Its commands autocomplete with what each one expects, it has loops, conditions and switch statements that compile to optimized commands, and packs share code through npm. It fits teams that already live in TypeScript and Node.

Example: a function that runs every second

import { MCFunction, tellraw } from 'sandstone'

MCFunction('announce', () => {
  tellraw('@a', { text: 'One second passed', color: 'gold' })
}, { runEvery: '1s' })

When to choose it? When your team is TypeScript-first and wants a Node workflow. When to prefer Kore? When you want the JVM toolchain, Kotlin's type system or the helper modules.

Beet and StewBeet, Python Pack Pipelines

Beet is a pack development kit: a Python library and toolchain that handles data packs and resource packs in one pipeline. Its primitives create, edit and merge packs, and plugins implement the workflow.

StewBeet is a separate project that runs inside Beet as a set of plugins. You declare an item or a block once, and every build writes its model, loot table, recipes, translations and an in-game manual page. From its README, a build also handles:

  • Custom block placement and destruction through Smithed Custom Block, and a loot table per item.
  • Vanilla recipes (crafting, smelting, stonecutting, smithing) and Smithed Crafter recipes.
  • Models and item definitions found from the names of your textures, sounds and music discs.
  • Lantern Load loading with version checks, plus tick, second and minute clocks.
  • Libraries such as Bookshelf, Smithed libraries, Common Signals and Smart Ore Generation, detected from your functions and downloaded for your Minecraft version.
  • Reproducible zips, merged with your libraries through Smithed Weld.

Example: one block definition (StewBeet)

Block(
    id="life_crystal_block",
    vanilla_block=VanillaBlock(id="minecraft:glass"),
    recipes=[CraftingShapelessRecipe(
        ingredients=8 * [Ingr("minecraft:glass")] + [Ingr("life_crystal")],
    )],
)

By hand, this block is eight files in two packs (place and destroy functions, loot table, two recipes, item definition, model and translation key), according to the StewBeet README.

Example: a Beet plugin

from beet import Context, Function

def greet(ctx: Context):
    """Plugin that adds a function for greeting the player."""
    ctx.data["greet:hello"] = Function(["say hello"], tags=["minecraft:load"])

When to choose them? Beet when you want a flexible Python pipeline to assemble packs. StewBeet when you want assets, loot, manuals and library integrations generated for you. Why they complement Kore: Kore can write the game logic in Kotlin while Beet or StewBeet handle assets and the build pipeline.

JMC, a Compact Scripting Language

JMC (JavaScript-like Minecraft Function) is a language that compiles to mcfunction. You get variables and conditions without a full framework, and the syntax is quick to learn. It centers on functions: other files, such as advancements, are written by hand in new blocks.

Example: a counter

say "just goes into the load function";

function countSeconds() {
    $timer++;
    if ($timer >= 20) {
        printf("One second passed");
        $timer = 0;
    }
}

When to choose it? For quick prototypes or simple packs centered on functions. When to prefer Kore? When the pack grows or you want all its resources in one typed codebase.

Conclusion

All four ecosystems work. Sandstone fits TypeScript teams, Beet and StewBeet fit Python pipelines and asset-heavy packs, JMC fits small function-only packs. I keep choosing Kore because the compiler checks the whole pack and because it follows each Minecraft version.

If you already use one of the others, you can adopt Kore for your critical logic first and move the rest later.

Share this article X LinkedIn Bluesky