コマンドリファレンス
Minecraft /function Command
developerJava版統合版 (Bedrock)
1つのゲームティックでコマンドシーケンスを含む関数ファイル(.mcfunction)を実行します。
バージョン対応
Java版:1.21.4 (1.13+)
統合版 (Bedrock):1.21.60
コマンド構文
両エディション
/function <name>引数の解説
nameResource ID必須Namespace location of the function (e.g. namespace:function_name).
実用的な使用例
/function arena:start_matchExecutes the commands defined in the "start_match" function within the "arena" datapack.
重要な注意事項
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.