1
How do i make a .mcfunction file?[1.12]
how do i make a .mcfunction file? i renamed my "brixjump" text document to "brixjump.mcfunction" but it doesn't work. what do i do?
also, i'm playing 1.12.
also, i'm playing 1.12.
Create an account or sign in to comment.
9
PepijnJust to provide an example (always make things more clear IMO).
A function located at:\saves\WORLDNAME\data\functions\custom\example\new\test.mcfunction
can be 'called' using:custom:example/new/test
A function located at:\saves\WORLDNAME\data\functions\Pepijn\code.mcfunction
can be 'called' using:custom:Pepijn/code
The names and amount of 'sub folders' are totally arbitrary (as long as you have at least one folder, because you need a namespace) but you should try to make your namespace something that other people are unlikely to use (in case others players want to use multiple functions from different creators)
The generic example was right, the last one is off. Your namespace is Pepijn there, not custom. (The function isn't located in a "custom" folder). You don't have to have a subfolder in the namespace.
So in the above example, you call the function using: /function Pepijn:code
thanks!
it's working, but i want to include a resource pack with the world.
where do i put my "resources.zip" folder? i've already done the textures.
it's working, but i want to include a resource pack with the world.
where do i put my "resources.zip" folder? i've already done the textures.
Directly inside the world folder. So "\saves\WORLDNAME\resources.zip".
Just to provide an example (always make things more clear IMO).
A function located at:
can be 'called' using:
A function located at:
can be 'called' using:
The names and amount of 'sub folders' are totally arbitrary (as long as you have at least one folder, because you need a namespace) but you should try to make your namespace something that other people are unlikely to use (in case others players want to use multiple functions from different creators)
A function located at:
\saves\WORLDNAME\data\functions\custom\example\new\test.mcfunction
can be 'called' using:
custom:example/new/test
A function located at:
\saves\WORLDNAME\data\functions\Pepijn\code.mcfunction
can be 'called' using:
Pepijn:code
The names and amount of 'sub folders' are totally arbitrary (as long as you have at least one folder, because you need a namespace) but you should try to make your namespace something that other people are unlikely to use (in case others players want to use multiple functions from different creators)
you put the function file in <world>/data/functions/<namespace>/
A namespace is a folder you can come up with yourself. Use your username, the creations name or something else fun.
Then in-game do /reload
and execute it once by doing /function <namespace>:<name>, where the name is the filename without ".mcfunction". You can execute it multiple times by putting the command on a redstone clock, 20 times a second in a purple command block that's always active OR 20 times a second by doing /gamerule gameLoopFunction <namespace>:<name>.
A namespace is a folder you can come up with yourself. Use your username, the creations name or something else fun.
Then in-game do /reload
and execute it once by doing /function <namespace>:<name>, where the name is the filename without ".mcfunction". You can execute it multiple times by putting the command on a redstone clock, 20 times a second in a purple command block that's always active OR 20 times a second by doing /gamerule gameLoopFunction <namespace>:<name>.
how do i load a function? i tried putting it in a folder in my functions in data, a folder within that folder, and by itself, but it can't locate it. is it something with the command automatically putting minecraft: before it?
-snip-
Inside your text editor, click "Save As..."
Then enter the filename "brixjump.mcfunction", now click the dropdown menu under the filename textbox and select "All Files (*.*)". After all that, hit Save.
".mcfunction" is an extension, it tells software what kind of file it is. For example, ".docx" is for word files, ".jpg" is for images. There are multiple extensions for word files and images and there are plenty of other types of files.
Selecting "All Files (*.*)" will prevent the text editor from adding another extension, overwriting ".mcfunction" in front.
Alternatively, you can uncheck "Hide extensions for known file types" in the "Display" tab of folder options or explorer options in config panel. I have a dutch pc, so I don't know the exact names of everything I just said. But once all file extensions are visible, you can hit rename on the file and rewrite the extension yourself.
Then enter the filename "brixjump.mcfunction", now click the dropdown menu under the filename textbox and select "All Files (*.*)". After all that, hit Save.
".mcfunction" is an extension, it tells software what kind of file it is. For example, ".docx" is for word files, ".jpg" is for images. There are multiple extensions for word files and images and there are plenty of other types of files.
Selecting "All Files (*.*)" will prevent the text editor from adding another extension, overwriting ".mcfunction" in front.
Alternatively, you can uncheck "Hide extensions for known file types" in the "Display" tab of folder options or explorer options in config panel. I have a dutch pc, so I don't know the exact names of everything I just said. But once all file extensions are visible, you can hit rename on the file and rewrite the extension yourself.
Honestly, I don't know what they are 'coz im a noob but... Try to redownload Minecraft (make sure everything is saved first!) and see of that works. Alternitivley, try naming the file what it was b4. Hope this helped!