内科専門医 今日もマイクラ処方中

Minecraftの医学的有効性を検証中

MENU

execute: Modify subcommands (day312)

15.3. Modify subcommands

15.3.1. align

コマンドの実行位置をブロックポジションにする(整数)。指定した軸のみ。

/execute align xz

(-1.8, 2.3, 5.9) -> (-2, 2.3, 5)

15.3.2. anchored

コマンド実行の位置を目か足に指定する。Defaultは足。

execute anchored eyes run tp ^ ^ ^

により、コマンド実行者の足を、その目の位置にテレポートする。

15.3.3. as

コマンド実行者を指定する。position, rotation, dimension, anchorは変更させない。

/execute as <targets>

targets: entity

複数のentityが指定された場合、各々がコマンド実行する。

ex.) すべての豚のデータを取得する

execute as @e[type=sheep] run data get entity @s

15.3.4. at

コマンド実行するposition, rotation, and dimensionを指定する

/execute as @e[type=sheep] at @s run tp ~ ~1 ~

全ての羊を1マス上に移動させる。

15.3.5. facing

向く方向を指定

15.3.6. in

dimensionとpositionを決める

execute in minecraft:the_nether run tp ~ ~ ~

overworldにいる場合、その座標に該当するネザーの座標にテレポートする。

15.3.7. positioned

コマンド実行の位置をセットする

execute positioned 0 64 0 run locate structure #village

0 64 0に近い村の場所を知る。

15.3.8.rotated