-
Notifications
You must be signed in to change notification settings - Fork 0
The Function Container
RedSponge edited this page Sep 22, 2018
·
1 revision
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:
public class MyFunctions : FunctionContainer {
}Before we start adding functions to it, let's first register it to the namespace:
// In the main method
main.CreateFunctions(new MyFunctions());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!