Four things to get right first
Where it goes
A data pack lives in <world>/datapacks/<your pack>/ with pack.mcmeta at the top and a data/ tree under it. /reload picks up changes without restarting.
Namespaces keep you out of trouble
Put your files under data/yourname/ rather than data/minecraft/. Anything you write in the minecraft namespace overwrites vanilla and will clash with the next pack someone installs.
Read the real file before you write yours
Every vanilla recipe, loot table and advancement is listed on this wiki exactly as it ships. Copying the shape of a working file is far faster than guessing at the schema.
One broken file kills the whole pack
A single missing comma makes the game refuse the pack and say so only in the log. Load after each file you add, not at the end.
Tools that do the work
Free, in the browser, nothing to install.
Reference, straight from the game files
Read out of the game with Mojang’s own data generator, so it matches the version exactly.
