You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RedSponge edited this page Sep 22, 2018
·
1 revision
Writing Functions
Once you've got a FunctionContainer set up, creating a function is as easy as creating a C# Method!
So to define a function called "Hello", you'll create a method named "Hello" inside your FunctionContainer class.
Now try adding the line Say("Hello!") to the function (will be explained later) and run it!
publicvoidHello(){Say("Hello!");}
The output should be something like this:
[/hello] say hello
As you can see, MCFunctionAPI translated the code into Minecraft commands! As well as that, if you check the output folder, you'll see that it created all the files for your datapack! You can now load it in Minecraft!