1

First, I'm a noob to the command community. Also, this is what I'm making for a survival series I call Atlantis. I got bored of Minecraft so this is what I'm doing for a solution. The command in theory is supposed to slow me down whenever I touch air.

So the command I am trying is the following:

/execute if block ~ ~2 ~ Minecraft:air as @a run effect give @a Minecraft:slowness 999999 20 true

This does not work. Any ideas?

Edit: Does it matter if it is conditional or unconditional. Same question for command block type.

0

You have several errors at once.

1)You run a block check from the artist and not from all players.

2)Many commands are case sensitive.

3)You are testing 2 blocks at the top.

That will be correct:

/execute as @a at @s if block ~ ~-0.51 ~ minecraft:air run effect give @s minecraft:slowness 999999 20 true

Note: In order for the check to work not from the executor of the command, but from the players over which the check takes place, we add "at @s" after "as @a".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.