1

How do i make a .mcfunction file?[1.12]

noplsno's Avatar noplsno6/3/17 4:28 pm
1 emeralds 9.9k 9
6/5/2017 12:30 pm
Bertiecrafter's Avatar Bertiecrafter
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.
Posted by noplsno's Avatar
noplsno
Level 2 : Apprentice Explorer
2

Create an account or sign in to comment.

9

1
06/05/2017 12:30 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
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
1
06/05/2017 9:33 am
Level 2 : Apprentice Explorer
noplsno
noplsno's Avatar
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.
1
06/05/2017 9:46 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Directly inside the world folder. So "\saves\WORLDNAME\resources.zip".
1
06/04/2017 1:41 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Just 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:
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)
1
06/04/2017 1:31 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
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>.
1
06/04/2017 10:43 am
Level 2 : Apprentice Explorer
noplsno
noplsno's Avatar
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?
1
06/04/2017 8:28 am
Level 1 : New Explorer
_Snowy_
_Snowy_'s Avatar
-snip-
1
06/04/2017 7:39 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
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.
1
06/03/2017 4:38 pm
Level 1 : New Explorer
_Snowy_
_Snowy_'s Avatar
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!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome