.MCFUNCTION File Extension

Minecraft Function

Developer Mojang
Popularity
4.4  |  93 Votes
 

What is an MCFUNCTION file?

An MCFUNCTION file is a Minecraft function, which contains a list of Minecraft commands. After adding an MCFUNCTION file to the game, players can quickly execute the commands the file contains. For example, executing an MCFUNCTION file may allow a player to say a pre-written statement in chat, teleport, or automatically move blocks.

More Information

Screenshot of a .mcfunction file in Microsoft Visual Studio Code
MCFUNCTION file open in Microsoft Visual Studio Code

Minecraft is a popular block-based construction and exploration game. Two versions of the game exist: the original Java Edition and the later Bedrock Edition.

In both versions, players can use MCFUNCTION files to add new game functions, which they can execute in the chat window by typing /function and selecting the appropriate MCFUNCTION file. Functions contain a list of one or more commands, all of which are executed when the player executes the function. For example, a function can be used to execute multiple fill commands, quickly filling a specific region with sets of pre-specified blocks.

Players write and edit MCFUNCTION files in text editors, such as Microsoft Visual Studio Code, Microsoft Notepad or Apple TextEdit. They then import them into Minecraft, using slightly different methods in each edition.

How to open an MCFUNCTION file

You can open an MCFUNCTION file and edit the commands it contains with Microsoft Visual Studio Code (multiplatform) or any other text editor. If you're using Visual Studio Code, installing the Data-pack Helper Plus extension provides helpful MCFUNCTION-related features, such as syntax highlighting.

How to import an MCFUNCTION file into Minecraft

To import an MCFUNCTION file into Minecraft Java Edition, you must place it in a data pack's functions sub-directory:

~/​.minecraft/​saves/​[WORLD_NAME]/​datapacks/​[DATA_PACK_NAME]/​data/​[DATAPACK_ID]/​functions

(This path may be different in some versions of Minecraft Java Edition.)

You'll then be able to use the function your MCFUNCTION contains in the associated world.

To import an MCFUNCTION file into Minecraft Bedrock Edition, you must place it into a behavior pack's functions directory. Then, you must import that behavior pack into Minecraft Bedrock Edition.

Open over 400 file formats with File Viewer Plus.Free Download

Programs that open or reference MCFUNCTION files

Verified by FileInfo.com

The FileInfo.com team has independently researched the Minecraft Function file format and Mac, Windows, Linux, Android, and iOS apps listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verified.

If you would like to suggest any additions or updates to this page, please let us know.