Explainer ~1 minute read
How function names work
"What do I type after /function?" is the question that trips up most first-timers. The answer is simple: it's your file's path inside the functions folder, minus the .mcfunction.
-
The name is the file path
A file at functions/manor.mcfunction is called with /function manor. Drop the functions/ part and the .mcfunction extension — what's left is the name. So functions/reset.mcfunction → /function reset. -
Subfolders become part of the name
Organize with folders and they join the name with slashes. functions/build/house.mcfunction is run as /function build/house. Names are lowercase and avoid spaces — stick to letters, numbers, _ and /. -
Let autocomplete confirm it
Not sure of the exact name in-game? Type /function in the Minecraft chat and it lists the functions your active packs provide. If your function shows up there, the pack loaded correctly — pick it and run.
Run it in-game.
Once your pack is active, calling the function is the last step. See it end to end.
Activate & run a pack