Riferimento del Comando
Minecraft /function Command
developerEdizione JavaEdizione Bedrock
Esegue un file di funzione (.mcfunction) contenente una sequenza di comandi in un singolo tick di gioco.
Compatibilità Versioni
Edizione Java:1.21.4 (1.13+)
Edizione Bedrock:1.21.60
Sintassi del Comando
Entrambe le Edizioni
/function <name>Argomenti Spiegati
nameResource IDObbligatorioNamespace location of the function (e.g. namespace:function_name).
Esempi Pratici
/function arena:start_matchExecutes the commands defined in the "start_match" function within the "arena" datapack.
Note Importanti
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.