- ...
- ...
- ...
- ...
- Find your world folder (
.minecraft/saves/<your world>/). - Copy this repository into
datapacks/— the folder that containspack.mcmetamust sit directly insidedatapacks/. - 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.
npm run ship # the gate: exactly what GitHub will checkThe 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.
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 |
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.
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 tenload.mcfunction is where objectives get created. Creating one twice is harmless, so
it is safe to leave that line there forever.
MIT — take it, change it, ship it.