Skip to content

Function Definitions

Ian edited this page Nov 27, 2023 · 2 revisions

Within the mcb language a function can be defined using the function keyword at the top level of a file or from within a directory.

After the function name an optional argument tick or load can be provided to have the function added the the Minecraft tick or load function tags.

function <name> [modifier] {...}

ex.

function hello {
    say this will run when it is called
}
function onload load{
    say this will run on load
}
function ontick tick{
    say this will run every tick
}

Clone this wiki locally