Guide
How to make a Minecraft datapack
Updated October 7, 2026
A datapack changes the game without mods or plugins: recipes, loot, advancements, functions that run every tick. It works on vanilla servers and singleplayer worlds. It is a folder (or a .zip) of JSON files and .mcfunction files with a strict layout.
An example to start from.
Generate this with CodexeStep by step
1.Create pack.mcmeta
The root file with a description and the
pack_formatnumber of your Minecraft version. A wrong number makes the game warn or refuse the pack.2.Add the data folder
data/<namespace>/with folders such asfunction,recipe,loot_tableandadvancement. Folder names changed in 1.21 (singular instead of plural).3.Write functions
.mcfunctionfiles hold commands, one per line. Hook them tominecraft:loadandminecraft:tickthrough function tags.4.Install it
Put the folder or .zip in
<world>/datapacks/and run/reload, or add it when creating the world.5.Test it
Check
/datapack list, then try every recipe and function in game. Errors appear in the server log.
With Codexe
Describe the recipes, loot or mechanics and the version. Codexe writes the files with the right layout and pack_format, loads the pack on a real Minecraft server to catch errors before it is Ready, and lets you join that server to play it.
Questions
Datapack or plugin?
A datapack needs no server software and works in singleplayer, but it can only do what commands and JSON allow. A plugin can do anything the server API allows, but needs Spigot or Paper.
Why does my datapack not load?
Usually a wrong pack_format, a folder name from another version, or a JSON error. The server log names the file.
Make a datapack
This prompt opens ready to send:
“A datapack for Minecraft 1.21.4: a shaped recipe for a "Sea Totem" (Heart of the Sea in the middle, gold around) that gives a Totem of Undying with a custom name, and a load function that adds a deaths scoreboard to the sidebar.”
Generate this with Codexe