- check_circle Functions
- check_circle Predicates
- 11,071 views, 5 today
- 1,097 downloads, 0 today
5
This datapack adds weather and seasons to the game. Each season lasts 8 Minecraft days and the weather will change depending on the season. There are currently 4 weather types: Sunny, Rain, Snow, Thunderstorm, Blizzard and Tornado.
The weather switches after 15 minutes but it can stop sooner. Each season lasts 16 minecraft days.
You can stop tornados/blizzards by killing the vex at the center. No tornados/blizzards will spawn after that.
You can manually change the weather with the following commands:
Sunny: /data modify storage panz_weather:weather weather set value 0
Snow: /data modify storage panz_weather:weather weather set value 1
Tornado: /data modify storage panz_weather:weather weather set value 2
Blizzard: /data modify storage panz_weather:weather weather set value 3
Thunder: /data modify storage panz_weather:weather weather set value 4
Rain: /data modify storage panz_weather:weather weather set value 5
This datapack is non destructive and hopefully not too anoying.
It also works in multiplayer. Have fun :)
The weather switches after 15 minutes but it can stop sooner. Each season lasts 16 minecraft days.
You can stop tornados/blizzards by killing the vex at the center. No tornados/blizzards will spawn after that.
You can manually change the weather with the following commands:
Sunny: /data modify storage panz_weather:weather weather set value 0
Snow: /data modify storage panz_weather:weather weather set value 1
Tornado: /data modify storage panz_weather:weather weather set value 2
Blizzard: /data modify storage panz_weather:weather weather set value 3
Thunder: /data modify storage panz_weather:weather weather set value 4
Rain: /data modify storage panz_weather:weather weather set value 5
This datapack is non destructive and hopefully not too anoying.
It also works in multiplayer. Have fun :)
Credit | Inspired by Extreme Weather and Seasons from cookedporkbacon. |
Compatibility | Minecraft 1.18 |
to | Minecraft 1.19 |
Tags |
6 Update Logs
Update #6 : by Panzrom 02/04/2023 8:45:47 pmFeb 4th, 2023
- Fixed a bug that caused the season to reset to spring on loading.
LOAD MORE LOGS
tools/tracking
5432034
119
panz-weather-and-seasons
Create an account or sign in to comment.
also does the snow melt? I haven't tried the snow yet.
I changed this because it was too laggy. Maybe later i will add it back in again.
But you can also edit the data\panz_weather\functions\new_weather.mcfunction. (You have to unzip it).
It looks like this:
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_4 run data modify storage panz_weather:weather weather set value 1
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_20 run data modify storage panz_weather:weather weather set value 2
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_4 run data modify storage panz_weather:weather weather set value 0
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_4 run data modify storage panz_weather:weather weather set value 5
The values correspond to the weather type (Tornado is 2). You can edit the predicate. Those are randomizer in the folder \data\panz_weather\predicates. You can only use them if the exist here. :1_in_40 for example doesnt exist but :1_in_50 does.
You can change for example:
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_20 run data modify storage panz_weather:weather weather set value 2
to
execute if data storage panz_weather:time {season:"spring"} if predicate panz_weather:1_in_50 run data modify storage panz_weather:weather weather set value 2
and tornados will spawn very very rarely in the spring. You can also delete that line and tornados wont spawn in the spring.
Since your datapack is in MC version 1.18-1.19, you can use value_check predicates to test if a number is greater or less than another one. I say that because this can allow the user to set up their own probability for each event through scoreboards. I think this would be easier for them as they don't need to go through all the datapack files.
Such predicate looks like this :
{
"condition": "minecraft:value_check",
"value": {
"min": 0,
"max": 100
},
"range": {
"min": 0,
"max": {
"type": "minecraft:score",
"score": "objectiveName",
"target": {
"type": "minecraft:fixed",
"name": "scoreHolderName"
}
}
}
}
This will test if a random number is between 0 and scoreHolderName score, meaning that scoreHolderName contains the probability of the event to happen in %.
With this you can easily modify the scoreHolderName score value to whatever probailibty you want in game.
Also, seeing what you wrote above, your probability of each event doesn't match the ones that are written in the predicates (weather value 1 has a probability of 0.13 to happen : 1/4 to be selected and 19/20*3/4*3/4 that none of the others is selected). Maybe it's intentional but if not, you can add something that test if the predicate was successfull and skip the other test, like an "execute store success" before "if predicate" and "execute unless success has happened before ...".
Anyway, interesting datapack !
Hope you find this^ useful !
great work!
You have to unzip the zipfile to edit the line:
execute if data storage panz_weather:time {moon:0s} run data modify storage panz_weather:time moon set value 16
in the file data/panz_weather/functions/new_day.mcfunction
The value of 16 is the number of days for each season.