Minecraft Wiki
Minecraft Wiki
Advertisement
Click to view a list of all the stubs in this wiki! Wait! I'm still growing!

This article is a stub. You can help the Minecraft Wiki by expanding this article.

Click to view a list of all the stubs in this wiki!

Functions are files in the .Minecraft folder. They can be activated through the Commands /function or /gamerule gameLoopFunction, or custom Advancements. Functions have the extension .mcfunction, which are text files with commands in them. They induce less lag than using command blocks.

Usage[]

/function "folder_name":"function_name" will activate the function once. /gamerule gameloopFunction "function_name" will have that function run every game tick.

Making Functions[]

To make a function, make a text document first and change the extension from .txt to .mcfunction. Open it using a text editor of your choice and start writing any commands for the functions.

Testing[]

  • Press Win + R and type %AppData%. Open .minecraft, then navigate to the saves folder.
  • Open a world file and make a new folder named Functions. Create a folder within Functions and give it a name. Function(s) can be pasted in that folder.
  • Open the world in Minecraft and use one of the methods above to execute them.
Advertisement