Weather, Storms & Tornadoes

Weather, Storms & Tornadoes

12M Downloads

Incompatibility problem with shaders not reacting to weather.

YeraX7 opened this issue ยท 8 comments

commented

Description of the Issue

I'm using Forge 1.20.1 with the latest version of Weather, Storms & Tornadoes, together with Oculus (Iris) and the Complementary shader pack. I've noticed that when it rains or when there are weather events like tornados, Complementary doesn't show any visual changes (the clouds, sun, etc. remain unchanged).

From what I've gathered, this mod replaces the vanilla weather system in Minecraft but doesn't seem to send the weather data to Iris. As a result, Complementary is unaware of the rain or the presence of a tornado, preventing any visual reaction.


Steps to Reproduce

  1. Install Forge 1.20.1
  2. Install the latest version of Weather, Storms & Tornadoes
  3. Install Iris along with the Complementary shader
  4. Enter a world and force rain or trigger a storm/tornado event

Expected Result

  • Complementary should display visual changes corresponding to rain or storms
    • For example, different lighting or animated rain clouds

Actual Result

  • Complementary remains unchanged:
    • The clouds, sun, and other visual elements stay the same
    • It appears as if the weather is always clear, regardless of rain or tornadoes

Additional Information

  • Forge version: 1.20.1
  • Weather, Storms & Tornadoes version: Latest available
  • Iris version: Most recent compatible with Forge
  • Shader pack: Complementary

Any help or workaround to make the shader recognize the modded weather effects would be greatly appreciated!

commented

As a note: this does not fix the translucency problems with Weather2's particles. So most particles are invisible / really hard to see when using shaders. Some shaders do work however, like Pastel, however others like Bliss dont.

commented

I've got a modification that triggers the rain effects when you're inside a storm. not sure if its ok to share with others (the modified Jar file), but it is possible to fix this.

forge supports a way to do this:

		//evaluate if storms size is big enough to be over player
		if (storm != null) {
			sizeToUse = storm.size * 2.0F;
			//extend overcast effect
			if (forOvercast) {
				sizeToUse *= 1F;
			}

			stormDist = storm.pos.distanceTo(plPos);
			if (sizeToUse > stormDist) {
				closeEnough = true;
				// Force client to think it's raining when in storm bounds
				if (Minecraft.getInstance().level != null) {
					Minecraft.getInstance().level.getLevelData().setRaining(true);
				}
			} else {
				// Reset rain state if not in storm bounds and no vanilla rain
				if (Minecraft.getInstance().level != null && !ClientTickHandler.weatherManager.isVanillaRainActiveOnServer) {
					Minecraft.getInstance().level.getLevelData().setRaining(false);
				}
			}
		}

I'm not an expert on Java programming, so you'll have to forgive me for bad practices. However, the code I posted above does work, and i've been using it for a while now. I also ended up modifying the storm's overal size to make the effect more pronounced.

commented

I've got a modification that triggers the rain effects when you're inside a storm. not sure if its ok to share with others (the modified Jar file), but it is possible to fix this.

forge supports a way to do this:

  //evaluate if storms size is big enough to be over player
  if (storm != null) {
  	sizeToUse = storm.size * 2.0F;
  	//extend overcast effect
  	if (forOvercast) {
  		sizeToUse *= 1F;
  	}

  	stormDist = storm.pos.distanceTo(plPos);
  	if (sizeToUse > stormDist) {
  		closeEnough = true;
  		// Force client to think it's raining when in storm bounds
  		if (Minecraft.getInstance().level != null) {
  			Minecraft.getInstance().level.getLevelData().setRaining(true);
  		}
  	} else {
  		// Reset rain state if not in storm bounds and no vanilla rain
  		if (Minecraft.getInstance().level != null && !ClientTickHandler.weatherManager.isVanillaRainActiveOnServer) {
  			Minecraft.getInstance().level.getLevelData().setRaining(false);
  		}
  	}
  }

I'm not an expert on Java programming, so you'll have to forgive me for bad practices. However, the code I posted above does work, and i've been using it for a while now. I also ended up modifying the storm's overal size to make the effect more pronounced.

Thank you for your response!

As we're not experienced in Java programming, could you please clarify how to configure the storm radius? Specifically, we're interested in understanding the parameters and their optimal values to ensure proper shader reactions during weather events.

Regarding shader compatibility, we've observed that and we are using one that do work (Complementary)

Additionally, we would like to know if your modifications are compatible with multiplayer servers. Is it necessary to edit the original mod's .jar file directly, or can these changes be implemented using a mod like KubeJS?
I ask if we have to edit the .jar file without being able to use KubeJS because we are a team working on a modpack, and if we modify it we don't know if it would be possible to be accepted in Curseforge.

Your guidance on these matters would be greatly appreciated.

commented

I just downloaded the source code and modified it. You'd have to wait for Corosauce to fix it in the source code if you want to just install from CF. im not a maintainer, just a random programmer

What I can do is make a public fork with my modifications, and build it for people to download and use, but i dont know if the licence terms allows me to do that yet.

as for multiplayer, i cant answer that since im playing on a single player world with my modifications. i wish you the best of luck with your modpack though!

commented

I see... Well, thank you very much for your answer!

It doesn't look like he's going to update the mod, although it would be amazing as it is as easy as doing or adding what you have done...
I tried to contact him but nothing, and I don't see a discord server either.

Thanks for your solution and I will try to try it to see if even without knowing programming or where to put the code, I manage to include it haha

commented

I've got a modification that triggers the rain effects when you're inside a storm. not sure if its ok to share with others (the modified Jar file), but it is possible to fix this.

forge supports a way to do this:

  //evaluate if storms size is big enough to be over player
  if (storm != null) {
  	sizeToUse = storm.size * 2.0F;
  	//extend overcast effect
  	if (forOvercast) {
  		sizeToUse *= 1F;
  	}

  	stormDist = storm.pos.distanceTo(plPos);
  	if (sizeToUse > stormDist) {
  		closeEnough = true;
  		// Force client to think it's raining when in storm bounds
  		if (Minecraft.getInstance().level != null) {
  			Minecraft.getInstance().level.getLevelData().setRaining(true);
  		}
  	} else {
  		// Reset rain state if not in storm bounds and no vanilla rain
  		if (Minecraft.getInstance().level != null && !ClientTickHandler.weatherManager.isVanillaRainActiveOnServer) {
  			Minecraft.getInstance().level.getLevelData().setRaining(false);
  		}
  	}
  }

I'm not an expert on Java programming, so you'll have to forgive me for bad practices. However, the code I posted above does work, and i've been using it for a while now. I also ended up modifying the storm's overal size to make the effect more pronounced.

Whats the file path to where I can put this code? I'm not a coder and have barely any experience, appreciate the help if u can.

commented

I've got a modification that triggers the rain effects when you're inside a storm. not sure if its ok to share with others (the modified Jar file), but it is possible to fix this.

forge supports a way to do this:

  //evaluate if storms size is big enough to be over player
  if (storm != null) {
  	sizeToUse = storm.size * 2.0F;
  	//extend overcast effect
  	if (forOvercast) {
  		sizeToUse *= 1F;
  	}

  	stormDist = storm.pos.distanceTo(plPos);
  	if (sizeToUse > stormDist) {
  		closeEnough = true;
  		// Force client to think it's raining when in storm bounds
  		if (Minecraft.getInstance().level != null) {
  			Minecraft.getInstance().level.getLevelData().setRaining(true);
  		}
  	} else {
  		// Reset rain state if not in storm bounds and no vanilla rain
  		if (Minecraft.getInstance().level != null && !ClientTickHandler.weatherManager.isVanillaRainActiveOnServer) {
  			Minecraft.getInstance().level.getLevelData().setRaining(false);
  		}
  	}
  }

I'm not an expert on Java programming, so you'll have to forgive me for bad practices. However, the code I posted above does work, and i've been using it for a while now. I also ended up modifying the storm's overal size to make the effect more pronounced.

I have no experience with coding, but where would I put this code?