Minecraft Blogs / Tutorial

How The /function Command Works! (1.12)

  • 6,956 views, 2 today
  • 3
  • 0
  • 3
JefferyColonTTV's Avatar JefferyColonTTV
Level 23 : Expert Dragon
13
Hey! This is a guide on how the new /function command works. lets start with what it does:

The /function command is a new command that was added in 1.12 Pre Release 1, and It basically allows players to put commands into a file outside of the game and activates the commands in a single tick in game.

The Command: How the command works is right here ---> so right now i want to make a function command that looks like this: /function items:diamonds
So what I want it to do is say in the chat "Given 1 Diamond to Gavin" and Give Me the diamond.
So what I do now is go outside the game, and i want to get to the Minecraft folders, and once you get there, click saves, then The World you are operating this on, click Data, and finally click functions.
Once you are in the functions folder, you are going to want to make a file with the command inside it, Im using a Mac computer, which means i have to create a file with TextEdit. once I'm in TextEdit, you're going to want to put the command you want in it.
Here are the commands inside the file:

/say Given 1 Diamond to Gavin
/give gavinthepowerful diamond 1

After we do that, we are going to close the file and name it "diamonds". And to create the final piece of it all, you need to create a folder and I would name it "items".
After all that work, you want to put the "diamonds" file into the "items" folder.

Once you finished all the above, go back into your Minecraft world and type /reload
And to run the command you need to do /function items:diamonds
And if all went well, we should have a diamond and the chat tell us we got a diamonds!

Please Comment, Favorite, and Diamond this Tutorial!
Tags

Create an account or sign in to comment.

1
06/12/2017 8:54 am
Level 23 : Expert Dragon
JefferyColonTTV
JefferyColonTTV's Avatar
And because of the previous update, you have to turn the diamonds file into diamonds.mcfunction, which allows it to work. sorry for the inconvenience :P
1
05/23/2017 10:37 pm
Level 23 : Expert Dragon
JefferyColonTTV
JefferyColonTTV's Avatar
NOTE: that The Mac and Windows Computer is different with files, so if you have a Windows computer, Linux, any other computer besides mac, then go check out how to get to your minecraft files on your computer.
1
05/21/2017 9:49 pm
Level 2 : Apprentice Explorer
Spunky_Sam
Spunky_Sam's Avatar
Thank you for giving me those diamonds! (My name irl is Gavin)
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome