#Detect if player is exposed to the sky

1 messages · Page 1 of 1 (latest)

solid yarrow
#

Hey!
I want to be able to check if a player is exposed to the sky. (no blocks above their head until build limit)
I did originally have a code that worked, which I cannot remember. I do remember it involving light levels.

Here's the code I already have. It does work, but only during the day.
if light level at location of player is 15

Thanks :D

SOLVED
if skylight level at location of player is 15:

tawny ruin
#

why not check the sky light level

#

which should be 15 if directly exposed and anything less would be indirect

solid yarrow
#

that's what I did, but it only works in daytime, is there any way to make it work in the night?

#

I'm on 1.20.1, that could be the issue. I think my previous server was 1.17

tawny ruin
#

but your code is just light level

solid yarrow
#

oh-