Is there some kind of testfor command in minecraft 1.16 snapshot?

Be
8

In the earlier versions of Minecraft there was the testfor command, is there a similar command that also works in the 1.16 snapshots?

Be
2

/ execute if…

E.g. / execute if entity @e [type = cow, distance = .2]

Be

And what does it do?

Will the player be killed when he is in the area?

Be

Nothing, in my example it tests whether a cow is within a radius of 2 blocks and then outputs yes or no like the Testfor command

Be

If you want a player to be killed, this is the best way to do it:

/ execute as @a [distance = .2] run kill @s

Gu
-1

it just says "test failed"

Gu
-1

it only says "test failed"

Gu
-1

/execute if entity @a[distance=.5] run kill @a If a player is within 5 blocks of command run, kill ALL players. Fun

Gu
-1

hey! i just found your question and i was wondering same. so here is what i found: execute if entity @e[dx=, dy=, dz=] run kill @e[type=!player, type=!item, dx=, dy=, dz=] this command kill any entity in a specified range (dx, dy, an dz, it goe fram the command block to the specified block) exept item and player) execute if entity @e[dx=, dy=, dz=] this part of the command detect if there is any entity in selected range. You can specify which entity by adding: "type=" between "[" and "dx" and you can add as much entity specs as you want. as usual, use "type=!player" to not aim player (replace player by any entity to not target other entity) hope it helps