Skip to content

Repository files navigation

What this is

Done when

  • ...
  • ...
  • ...

Not in v1

  • ...

Install it into a world

  1. Find your world folder (.minecraft/saves/<your world>/).
  2. Copy this repository into datapacks/ — the folder that contains pack.mcmeta must sit directly inside datapacks/.
  3. In the game: /reload.

Check it worked: /function mypack:hello should print a line in chat.

The namespace is mypack everywhere. Rename it once you know what your pack is about — folder, tags and every function call have to change together, and the gate will tell you if you miss one.

Every time you change a file, run /reload again. That is your whole edit loop.

Check it before the game does

npm run ship     # the gate: exactly what GitHub will check

The game is a bad error reporter. A typo in a JSON file usually means the pack just does not load, with no explanation. The gate reads every file and tells you which line is wrong, in words.

What already works, and what is yours

You own data/<namespace>/function/. That is where your mechanics live. Everything else is the wiring that packs usually die on.

File What it does
function/tick.mcfunction runs every tick — your main loop
function/hello.mcfunction a working example. Meant to be replaced
pack.mcmeta tells the game this is a datapack and which version it is for
function/load.mcfunction runs once on /reload: scoreboards, constants
data/minecraft/tags/ hooks that make load and tick actually run
scripts/check.mjs the gate

The one thing that breaks everything

pack_format must match your Minecraft version. Wrong number and the pack silently does not load — no error, no hint, nothing in chat. It is the single most common reason a datapack "does not work".

The number changes with almost every release, so it is not written down here on purpose: anything printed today would be wrong by the time you read it. Ask your AI assistant to look up the current pack_format for your exact version and show where it got it from — that is a skill you will need far beyond Minecraft.

Scoreboards, briefly

Datapacks have no variables. Anything you want to remember lives in a scoreboard:

scoreboard objectives add my_counter dummy
scoreboard players add @s my_counter 1
execute if score @s my_counter matches 10.. run say ten

load.mcfunction is where objectives get created. Creating one twice is harmless, so it is safe to leave that line there forever.

Licence

MIT — take it, change it, ship it.

About

Course starter for vibe-coding: a Minecraft datapack skeleton. Students write .mcfunction files; a gate catches the mistakes Minecraft fails at silently.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages