r/MinecraftCommands • u/_Puron • 18d ago
Help | Bedrock How can I detect rain?
Working on a thirst bar, and thought it'd be fun if I l made it so when looking up while it's raining would reflenish thirst. I looked through all the commands and I don't think I cound anything?
So I'd not mind any info for what i could do
3
Upvotes
1
u/VladimireUncool Command Rookie 18d ago edited 18d ago
My first instinct would be using cauldrons somehow, as they fill up when it rains.
I'm not too keen on bedrock commands, but i think there's a /testforblocks, in which you can test for a cauldron filled to the first level, then run the thirst-commands, and lastly /setblock the water-cauldron with an empty one to repeat the cycle.
3
u/PlasmaTurtle21 Bedrock command Experienced 18d ago
https://wiki.bedrock.dev/commands/detect-rain
The bedrock command wiki has a section on rain detection using fire.
1
u/theonlygreenleaf Command Experienced 18d ago
On Java I would say just use a predicate I have no idea for bedrock. If you don't find a better solution you might be able to compare a daylight and nightlight detector which in theory can detect rain but I'm not sure how reliable it is.