0

The answer here technically works when utilizing command blocks, but isn't possible when working with datapacks. I do have the same limitations as the linked question, in that I can't use cauldrons, soil, and so on to detect it.

What I'm attempting to do is make it rain infinitely, but I don't want it to continuously run the command. Yes, I can set up commands so that load.json runs it on server (re)load, but the maximum time I can set that to is roughly 11 days. Since I'm making a datapack that is intended for survival world use, I need this to be continuous and run again if it's no longer raining.

2
  • Your actual issue is that you don't want to run a command as often? Then use /schedule. Also, the fire solution doesn't require command blocks, only commands. That works the same in functions. Commented Sep 17, 2020 at 0:00
  • 4
    Possible duplicate of Can you turn weather off in Minecraft? (see answer)
    – pppery
    Commented Sep 17, 2020 at 0:41

1 Answer 1

3

You don't need to detect when it's raining to do that. Simply set the doWeatherCycle gamerule to false and run /weather rain in your function (the one that's registered in load.json). When the weather cycle gamerule is true, the weather can change naturally. When it's false, it can only be changed with commands.

Not the answer you're looking for? Browse other questions tagged .