Why Sandstone
Perfect Autocompletion
Sandstone tells you what a command expects, and autocompletes complicated arguments for you. It works for every resource: commands, predicates, loot tables, advancements, and more.
Organize Resources Your Way
Pack multiple functions, advancements, or loot tables into a single file, or mirror vanilla's one-per-file layout. You get comments, indentation, and every other benefit of a real programming language.
Optimized Abstractions
If/else, boolean logic, while and for loops, sleep. All built in, and tuned to compile to faster code than most hand-written functions. Drop down to vanilla commands any time you want.
Share on NPM
Publish your functions to NPM and let anyone install them into their own packs. Raycasting, better tellraw, whole libraries, you can finally stop reinventing the wheel.
Real Patterns From Real Packs
Adapted from the Sandstone booth at Summit 2026. Pick a pattern, then flip between the TypeScript and the functions it compiles to.
An options object plus a closure, reused anywhere you need a hitbox check.
interface HitboxOptions {type?: stringwidth?: numberheight?: numberonHit: () => void}function checkHit(opts: HitboxOptions) {const w = opts.width ?? 0.9const h = opts.height ?? 2.0const type = opts.type ?? '#minecraft:skeletons'execute.positioned(rel(-w, -h / 2, -w)).run(() => {execute.as(Selector('@e', {type,dx: w * 2,dy: h,dz: w * 2})).if.entity('@s').run(() => {opts.onHit()})})}// UsageMCFunction('check_sword_swing', () => {checkHit({width: 1.2,height: 2,onHit: () => {say('Hit detected!')effect.give('@s', 'minecraft:glowing', 3, 0)}})})
Ready to build your datapack?
Jump into the docs and write your first Sandstone function in minutes.
Get Started- or -