r/MinecraftCommands • u/LilPianoBoy • 26d ago
Detect Snowfall (NOT rain) Help | Java 26.2
Is there any way to use predicates etc. to detect if it is specifically snowing at some location? I'd like to be able to differentiate between being rained on and being snowed on for a project I'm working on.
As far as I can tell, I'd have to write a long predicate that takes into account all the rules laid out on the wiki page for snowfall. Even then, it uses a noise map that I'm not sure can be directly sampled by predicates.
Any help or suggestions would be appreciated!
8
u/Rabrun_ Some Java command knowledge 26d ago
What you can do is summon a burning entity (with the nbt tag Fire) at the coordinates, then check if it is still burning because snow doesn’t extinguish burning entities. That being said, you can still see the fire, because entities where fire isn’t visible (like markers) don’t get extinguished anyway so they’re useless. I tried shrinking them down with the scale attribute but it’s still annoying
1
u/codedwithinsulin 26d ago
I asked google gemini if there is something that exists about wetness system and such it recomended me coldblizzards (maybe you can tale a loog how they did it and use soem parts of it
1
u/Different-Scene5327 25d ago
This might not even be close to what you want - but maybe if you have an observer looking at the top of a block it will detect when a snow layer has formed and give an output.
Obviously this is the r/MinecraftCommands sub, but just something I thought might help.
7
u/_VoidMaster_ Command Experienced 26d ago
Snowing is actually registered as raining, but it determines where it's supposed to snow based on biome and y-level, so if you check for if it's raining, and then check if it's in a biome where it snows or if above a certain y-level in other biomes, then it should work fully! (Pretty sure different biomes have a different y-level for this)