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
The Function Container
To create functions, you'll first need a class to contain all of those.. this is where the FunctionContainer class comes in!
Let's create a new class called MyFunctions which will extend the FunctionContainer class:
publicclassMyFunctions:FunctionContainer{}
Before we start adding functions to it, let's first register it to the namespace:
// In the main methodmain.CreateFunctions(newMyFunctions());
The FunctionContainer has a lot of very useful methods for when you write functions. and by registering it to the namespace, all of the functions in that class will be compiled down to mcfunction files usable in the game!