Перейти к содержимому
Mineforgian

/execute

Выполняет команду от имени/в контексте других сущностей и позиций.

Псевдоним команды /execute

Синтаксис

/execute align <axes> → /execute …/execute anchored <anchor> → /execute …/execute as <targets> → /execute …/execute at <targets> → /execute …/execute facing entity <targets> <anchor> → /execute …/execute facing <pos> → /execute …/execute if biome <pos> <biome> → /execute …/execute if block <pos> <block> → /execute …/execute if blocks <start> <end> <destination> all → /execute …/execute if blocks <start> <end> <destination> masked → /execute …/execute if data block <sourcePos> <path> → /execute …/execute if data entity <source> <path> → /execute …/execute if data storage <source> <path> → /execute …/execute if dimension <dimension> → /execute …/execute if entity <entities> → /execute …/execute if function <name> → /execute …/execute if loaded <pos> → /execute …/execute if predicate <predicate> → /execute …/execute if score <target> <targetObjective> < <source> <sourceObjective> → /execute …/execute if score <target> <targetObjective> <= <source> <sourceObjective> → /execute …/execute if score <target> <targetObjective> = <source> <sourceObjective> → /execute …/execute if score <target> <targetObjective> > <source> <sourceObjective> → /execute …/execute if score <target> <targetObjective> >= <source> <sourceObjective> → /execute …/execute if score <target> <targetObjective> matches <range> → /execute …

Из официального дерева команд Minecraft 1.21.4. <аргумент> — подставь значение.

Аргументы

АргументТип
<axes>оси (xyz)
<anchor>minecraft:entity_anchor
<targets>сущность или селектор (@p, @a, @e, @s, @r)
<pos>координаты (x y z)
<biome>minecraft:resource_or_tag
<block>блок или тег блока
<start>координаты блока (x y z, поддерживает ~ и ^)
<end>координаты блока (x y z, поддерживает ~ и ^)
<destination>координаты блока (x y z, поддерживает ~ и ^)
<sourcePos>координаты блока (x y z, поддерживает ~ и ^)
<path>NBT-путь
<source>сущность или селектор (@p, @a, @e, @s, @r)
<dimension>измерение
<entities>сущность или селектор (@p, @a, @e, @s, @r)
<name>minecraft:function
<predicate>идентификатор (namespace:path)
<target>владелец счёта
<targetObjective>цель таблицы очков
<sourceObjective>цель таблицы очков
<range>minecraft:int_range
<heightmap>карта высот
<rot>поворот (yaw pitch)
<targetPos>координаты блока (x y z, поддерживает ~ и ^)
<scale>число
<id>идентификатор (namespace:path)
<objective>цель таблицы очков
<entity>minecraft:resource

Примеры

/execute as @a at @s run tp @s ~ ~1 ~

Подбросить всех игроков на 1 блок

/execute if entity @e[type=creeper,distance=..10] run say Осторожно, крипер!

Условное выполнение

Подробнее на Minecraft Wiki ↗