Referência do Comando
Minecraft /function Command
developerEdição JavaEdição Bedrock
Executa um arquivo de função (.mcfunction) contendo uma sequência de comandos em um único tick do jogo.
Compatibilidade de Versões
Edição Java:1.21.4 (1.13+)
Edição Bedrock:1.21.60
Sintaxe do Comando
Ambas as Edições
/function <name>Argumentos Explicados
nameResource IDObrigatórioNamespace location of the function (e.g. namespace:function_name).
Exemplos Práticos
/function arena:start_matchExecutes the commands defined in the "start_match" function within the "arena" datapack.
Notas Importantes
Functions are the foundation of custom game loops, mini-games, and map setups. Since they run on the server side in a single tick, they are significantly more efficient than long chains of command blocks.