命令/testfor - 中文 Minecraft Wiki
统计圆心为 (0,64,0)、半径为3米的区域内的生存玩家数量: /testfor @a[x=0,y=64,z=0,r=3,m=0] 统计圆心为 (0,64,0)、半径为20米的区域内的僵尸数量: /testfor @e[x=0,y=64,z=0,r=20,type=zombie]
Searching…
统计圆心为 (0,64,0)、半径为3米的区域内的生存玩家数量: /testfor @a[x=0,y=64,z=0,r=3,m=0] 统计圆心为 (0,64,0)、半径为20米的区域内的僵尸数量: /testfor @e[x=0,y=64,z=0,r=20,type=zombie]
Counts entities (players, mobs, items, etc.) matching specified conditions.
你可以把这个命令方块调成循环,保持开启,然后后面接一个连锁 有条件的 保持开启 然后在后面的命令方块写上你要执行的指令~如果检测指令执行成功了以后后面的命令方块就会执行~ 比如:第一个命令方块:testfor @a [t=3] 第二个命令方块:say 1
This Minecraft tutorial explains how to use the /testfor command with screenshots and step-by-step instructions.
这里的testfor是一个检测生物的指令 必须有个输入端 检测到特定条件的生物靠近后就会输出,要输出必须在命令方块的任何一侧放比较器。
testfor---- The first command-block only command added in Minecraft Snapshot 13w03a. It tests for whether specified player is online (testfor [player]), or at specified coordinate and/or in radius (testfor @p [x,y,z],...
/testfor指令一般在循环,无条件,保持开启的 命令块 中,后面接着一个连锁,有条件,保持开启的命令块。 就是如果testfor执行成功(探测到符合条件的实体),就执行连锁命令块中的命令,当然,连锁命令块也可以多加几个,但是一定要保证逻辑的畅通