第13页:execute指令
展开execute指令
好,我们先认识一下execute指令的格式:
/execute <实体> <x> <y> <z> <另一个指令> / /execute <实体> <x> <y> <z> detect <x> <y> <z> <方块名> <数据值> <另一个指令>
好,来讲一下,第一条指令是纯粹探测实体,第二个则是探测实体并对特定的方块进行侦测。另一条指令则是输入另外一条指令。
好,我们来做一个简单的跑酷,用execute进行侦测并输出(需要高速脉冲):
加速的:
/execute @p ~ ~ ~ detect ~ ~-1 ~ minecraft:stained_hardened_clay 1 /effect @p 10 1 1
跳跃的:
/execute @p ~ ~ ~ detect ~ ~-1 ~ minecraft:stained_hardened_clay 4 /effect @p 10 1 1
更多相关内容请关注:我的世界专区
责任编辑:修凡客