
/execute
チート / OP 2Java版 26.3
別のエンティティとして、別の位置で、または条件を満たしたときだけ、別のコマンドを実行します。 基本形は/execute if biome <pos> <biome>で、17通りの構文と27個の引数があります。権限:チート / OP 2。
/executeの構文
ゲームデータゲームが受け付けるすべての形式です。<山かっこ>内の語は入力する引数で、それ以外はそのまま入力します。
/execute if biome <pos> <biome>/execute if block <pos> <block>/execute if blocks <start> <end> <destination> all/execute if blocks <start> <end> <destination> masked/execute if data block <source> <path>/execute if data entity <source> <path>/execute if data storage <source> <path>/execute if dimension <dimension>/execute if entity <entities>/execute if items block <source> <slots> <item_predicate>/execute if items entity <source> <slots> <item_predicate>/execute if loaded <pos>/execute if predicate <predicate>/execute if score <target> <targetObjective> < <source> <sourceObjective>/execute if score <target> <targetObjective> <= <source> <sourceObjective>/execute if score <target> <targetObjective> = <source> <sourceObjective>/execute if score <target> <targetObjective> > <source> <sourceObjective>/executeのrunのように、別のコマンドの構文に続く分岐もあります(…で表示)。
/executeの使用例
そのまま貼り付けて使える例です(チート有効時)。@sは自分、@pは最寄りのプレイヤー、@aは全員、@eはすべてのエンティティです。
/execute as @a at @s run summon minecraft:firework_rocket ~ ~1 ~- 全プレイヤーの頭上に花火を打ち上げます。
/execute if block ~ ~-1 ~ minecraft:gold_block run say Gold!- 金ブロックの上に立っていれば「Gold!」と言います。
/executeの引数
各引数に入れる値と、ゲームが設けている制限です。
| 引数 | 入力する値 | 制限 |
|---|---|---|
<axes> | 軸(x、y、zの組み合わせ) | — |
<anchor> | eyesまたはfeet | — |
<targets> | ターゲットセレクターまたはプレイヤー名(@s、@p、@a、@e、@r) | 1つ以上 |
<pos> | 位置(x y z、小数可) | — |
<biome> | ゲームIDまたは#タグ | worldgen/biome |
<block> | ブロックIDまたは#タグ([状態]指定可) | — |
<start> | ブロック座標(x y z、~は相対、^はローカル) | — |
<end> | ブロック座標(x y z、~は相対、^はローカル) | — |
<destination> | ブロック座標(x y z、~は相対、^はローカル) | — |
<source> | ブロック座標(x y z、~は相対、^はローカル) | — |
<path> | NBTパス | — |
<dimension> | ディメンション(minecraft:overworld、the_nether、the_end) | — |
<entities> | ターゲットセレクターまたはプレイヤー名(@s、@p、@a、@e、@r) | 1つ以上 |
<name> | 関数IDまたは#タグ | — |
<slots> | スロットソース | — |
<item_predicate> | アイテムIDまたは#タグ(コンポーネント指定可) | — |
<predicate> | プレディケートID | — |
<target> | スコアホルダー(セレクター、名前、または*) | 対象は1つ |
<targetObjective> | スコアボードの目的の名前 | — |
<sourceObjective> | スコアボードの目的の名前 | — |
<range> | 数値の範囲(例:1..5) | — |
<id> | 名前空間付きID(minecraft:…) | — |
<heightmap> | ハイトマップの種類 | — |
<rot> | 回転(ヨー ピッチ) | — |
<scale> | 数値 | — |
<objective> | スコアボードの目的の名前 | — |
<entity> | レジストリのゲームID | entity_type |
別のエンティティとして、別の位置で、または条件を満たしたときだけ、別のコマンドを実行します。 17通りの構文があり、実行できるのは:チート / OP 2。
関連ページ
/executeのよくある質問(Java版 26.3)
マイクラの/executeは何をするコマンド?
別のエンティティとして、別の位置で、または条件を満たしたときだけ、別のコマンドを実行します。
/executeの構文は?
基本形は/execute if biome <pos> <biome>です。すべての形式は上に掲載しています。
/executeの使用例は?
/execute as @a at @s run summon minecraft:firework_rocket ~ ~1 ~ — 全プレイヤーの頭上に花火を打ち上げます。
/executeにはチートが必要?
はい:チート / OP 2。シングルプレイでは「チートの許可」をオンにします(またはチートありでLANに公開)。