Referencia del Comando
Minecraft /function Command
developerEdición JavaEdición Bedrock
Ejecuta un archivo de función (.mcfunction) que contiene una secuencia de comandos en un solo tick.
Compatibilidad de Versiones
Edición Java:1.21.4 (1.13+)
Edición Bedrock:1.21.60
Sintaxis del Comando
Ambas Ediciones
/function <name>Argumentos Explicados
nameResource IDRequeridoNamespace location of the function (e.g. namespace:function_name).
Ejemplos Prácticos
/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.