SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.06k stars 369 forks source link

Suggestion: Rain/Snow block detection #421

Open dylancircle5 opened 7 years ago

dylancircle5 commented 7 years ago

Would like to see the addition of a condition for rain in snow fall on blocks in the form of %block% is being (rained | snowed) on

Would find this useful for game enhancements like torch removal in rain or crop freezing in the mountains. Possible entity interaction would also be appreciated if possible, though not my main goal of making this request.

TheBentoBox commented 7 years ago

You can mostly detect this already by checking if the sunlight level above the block is 15, meaning it has a clear view to the sky. The only issue with this is it may have other blocks above it which let light through (like glass), but there are already addons to get the highest block in a single column (I believe both MundoSK and TuSKe have this), as well as easy ways to code it yourself without addons, so I'm not really sure if this is something that should be implemented.

TheLimeGlass commented 1 year ago

Not possible for block, but it currently is possible for entity if using Paper spigot. You can spawn an entity at the location like an invisible amour stand and use https://docs.skriptlang.org/docs.html?search=#CondEntityIsInLiquid

BaeFell commented 1 year ago

While this issue is 6 years old, it's possible by checking if the weather is rain and checking if there is air above the block. Not elegant but really the only way.

Not possible for block, but it currently is possible for entity if using Paper spigot. You can spawn an entity at the location like an invisible amour stand and use https://docs.skriptlang.org/docs.html?search=#CondEntityIsInLiquid

Not what was being asked at all.

Moderocky commented 1 year ago

While this issue is 6 years old, it's possible by checking if the weather is rain and checking if there is air above the block. Not elegant but really the only way.

We might be able to shortcut this check by looking at the sky light too, since if the sky light is not full then there must be something obscuring the block that would stop rain and snow.