-
Notifications
You must be signed in to change notification settings - Fork 35
Let's Talk Rain
When it comes to weather Minecraft has two time windows it uses:
- Rain interval. The amount of time it will rain, or the amount of time between rain windows.
- Thunder interval. The amount of time a chance of a lightning bolt will spawn, or the amount of time between thunder windows.
These two windows operate independent of each other. It is possible to be in a rain window and not in thunder; or in a thunder window and not in rain. If raining, of course, you will get the rain animations, the sounds, darkening of the sky, etc. If it happens to be within a thunder window as well as a rain window it is considered to be storming. The skies darken a bit more, and there is a chance per tick that a lightning bolt will spawn and strike.
At the start of a rain window Dynamic Surroundings will generate a rain intensity value for the storm and store that away somewhere in the world data information. This information will be sent to all players in the dimension so they have the same value. Based on this value Dynamic Surroundings will:
- Vary the amount of rain textures to render per tick. The higher the rain intensity, the more textures get rendered.
- Vary the amount of rain splash particles that get generated around the player. The higher the rain intensity, the more particles that get rendered. (The rain splash sound is generated during this phase, so the higher the intensity the more sounds get played giving the sense of density.)
If it happens to be in the thunder window as well Dynamic Surroundings can generate a series of background thunder events that get broadcast to players in the dimension. The Dynamic Surroundings rain intensity must be equal or greater than the configured threshold (75 is the default). These events will result in a thunder sound playing, as well as a chance of a light flash simulating the lightning. NO LIGHTNING BOLTS ARE GENERATED! Minecraft, of course, could generate a lightning bolt based on its logic, but that is up to Minecraft.
When the storm is over the rain will stop, and any background thunder being generated will stop.
The areas where Dynamic Surroundings alters Minecraft data for rain are as follows:
- Customizable rain and thunder intervals. By default the settings are based on normal Minecraft operations. A modpack author can alter these settings by tweaking the Dynamic Surroundings configuration file to customize rain/thunder intervals.
- To get weather effects in the Nether Dynamic Surroundings temporarily convinces the Minecraft weather mechanics that weather is possible. This is a vary narrow window and should not affect any other mods - Dynamic Surroundings owns the server tick at that point and is insulated.
- To get the flash in background thunder Dynamic Surroundings manipulates the same data that an EntityLightningBolt will. Only happens in the client space and is safe.
- You can customize the rain intensity threshold for when background thunder can take place. Change the “Rain Intensity for Background Thunder” to the desired value.
- You can disable background thunder. If disabled on a server, no clients will receive the events. If disabled on the client, it will ignore events coming from the server.
- The thunder sound that is played are ones provided by Dynamic Surroundings.
- If the mod Localized Weather and Stormfronts (Weather2) is installed rain mechanics will be disabled. Weather2 supplies a lot of weather related mechanics and Dynamic Surroundings would interfere.