How to detect above of the player is air?

Discussion in 'Skript' started by BrownMee, Nov 15, 2020.

Not open for further replies.
1. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
How do I test if above players is a block or is air?

#1
2. Tistay New Member

Joined:
Nov 15, 2020
Messages:
7
0
Hey there.
Code (Text):
1. if block 2 meters above player is air:
This should do the job.

#2
3. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
How to detect if you are not expose to sunlight or moonlight?

#3
4. Tistay New Member

Joined:
Nov 15, 2020
Messages:
7
0
I believe you can check the sunlight level at a location, so just check the light level at the player. Smarter people could give you a more complete answer tho

Edit:
Ye, https://docs.skunity.com/syntax/search/id:5177.

#4
5. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
Code (Text):
1. if block 1 meters above event-block is air:
is it possible to do 1 blocks above instead of meters?

#5
6. Marsbar Active Member

Joined:
Mar 31, 2019
Messages:
131
4
if sunlight level at block above event-block > 5

#6
7. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
I don't want to check light level now. I want to check above is 3x3 above me is air or not

#7
8. Ankoki Supporter

Joined:
Nov 5, 2020
Messages:
55
12
pretty sure 1 block is 1 meter. Could be wrong.

#8
9. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
nope i tried and its actually like 100 blocks

#9
10. Goose Supporter

Joined:
Nov 23, 2019
Messages:
429
30
You'd be right. Minecraft blocks are actually just 1 cubic meter in size.

EDIT:
Could try
Code (Text):
1. if block above player is air

#10
11. BrownMee Active Member

Joined:
Apr 16, 2018
Messages:
126
6
sorry,
i wanna check the entire block above me is air or not? is that possible?
i wanna make something to triggers it only when player is in house or shelter

#11
Not open for further replies.