2

Commands - Execute if in the open

Skem 10/3/22 12:52 pm history
136
10/4/2022 1:22 pm
Im trying to set up a command block that gives a effect if your out in the open[​aka you have no roof/block over your head], does anyone know how to use a /execute command to do this?
Posted by
Skem
Level 1 : New Miner
0

  Have something to say?

JoinSign in

3

Spuduking
10/03/2022 2:01 pm
Level 34 : Artisan Procrastinator
/execute at @s if block ~ ~3 ~ air run <command>
1
Skem
10/04/2022 2:58 am
Level 1 : New Miner
thank you, ill try this out and see if it works
2
Spuduking
10/04/2022 1:22 pm
Level 34 : Artisan Procrastinator
You might also want to play around with /execute at @s if blocks (I've never used 'if blocks' but it looks like it might work better. The command I gave you before only tests the block right above the player's head.
1

Welcome