Rivmun / SuperFancyCloudsRefabricated

A unofficial multiloader port of Minecraft quilt-side mod SuperFancyClouds.
MIT License
5 stars 1 forks source link

Unusual cloud rendering bug #49

Closed BLOKBUSTR closed 1 year ago

BLOKBUSTR commented 1 year ago

This just seemingly happened out of the blue, so I cannot provide steps to replicate this bug, though I believe this could've occurred because I was playing on the world for too long. At some point in my world I noticed that the clouds formed a large sort of wall in a sylinder shape around my position. I assume this may be related to the render distance. If it helps provide any pointers to a solution, I have "Cloud Render Distance Fit to View" disabled. I've re-enabled this for the time being to see whether this bug would reoccur.

2023-04-19_19 17 02

Rivmun commented 1 year ago

Seems you enabled "Biome Detect From Chunk" in Dynamic config tab, right? How about "- Use Loaded Chunk"? I guess it causing by density value error when calculate outer clouds Try to enable "Debug" option when it occurs again and let's see what log says.

BLOKBUSTR commented 1 year ago

It's possible that I might've had "Biome Detect From Chunk" enabled and "- Use Loaded Chunk" disabled at that moment, though I don't exactly remember.

I have recorded almost three minutes of myself testing what would happen when I changed these settings and uploaded the video and the log itself to a Dropbox folder. The events recorded in the video start at the log timestamp 20:47:52. It seems the strangest results come from when both options are enabled. https://www.dropbox.com/sh/8y7uzpq7v18oyvg/AADRN5jls0w6X1TP4HOYtgzsa?dl=0

I am using version 1.7.0 of SFCR, as well as:

I think I might also want to mention straightaway that I'm using the Terralith datapack, so it's possible that it might be influencing the behavior of SFCR in some way with all its different biomes, though I cannot be sure. I really hope this helps; I'm completely free tomorrow, so I can provide any further information or testing if needed.

Rivmun commented 1 year ago

I saw this video and log. It's very helpful.

But I have no idea how this issue happens. I try to analyze and found something strange:

I decide to fix the "Terrain Dodge" to compatible with Terralith first #51 . I'll mention you and paste patch file to here when it done.

Rivmun commented 1 year ago

I'm fixed the terrain dodge with Terralith and add some debug output in weather calculation. Download this dev build in Artifacts and try. https://github.com/Rivmun/SuperFancyCloudsRefabricated/actions/runs/4771052503

BLOKBUSTR commented 1 year ago

I tested the Artifact on a clean installation with very minimal mods, and the weather density values appear to be far more consistent. I have not noticed any abnormal cloud shapes or holes either during my testing.

I uploaded the latest log to the same Dropbox folder above and renamed the old log and video accordingly. In the game chat I did mention another recording, but I decided it wasn't really worth uploading as nothing anomalous happened anyway. I'll still keep it on my machine for now just in case.

Rivmun commented 1 year ago

Thanks for your logs. I find some dubious problem that may causing weather detection failure:

[13:13:05] [Server thread/INFO]: thndTime: 13431, rainTime: 87813, clearTime: 0 [13:13:05] [Server thread/INFO]: currentWeather: CLEAR, nextWeather: THUNDER

If the weather detect time is default (10s), nextWeather is wrong in here. It should be CLEAR when thndTime is bigger than 200 (ticks).

[13:13:35] [Server thread/INFO]: thndTime: 12831, rainTime: 87213, clearTime: 0 [13:13:35] [Server thread/INFO]: currentWeather: CLEAR, nextWeather: THUNDER [13:13:36] [Render thread/INFO]: wc: false, bc: true, wd: 0.5, bd: 0.69609356

If currentWeather is not equal to nextWeather, weather changing (wc) shouldn't be false.

Density value was correct is a lucky thing. 😂 Wait a few moments, I'll dig it out why.

Rivmun commented 1 year ago

If currentWeather is not equal to nextWeather, weather changing (wc) shouldn't be false.

Fixed in 2e82e3be153f0a20933b0317c39b58a4fd6929ab. It's causing by weatherChanging has been override when client ticking the weather. I should disable it when there is a server (or integrated server if in singleplay). You can download the latest build in Actions tab.

If the weather detect time is default (10s), nextWeather is wrong in here. It should be CLEAR when thndTime is bigger than 200 (ticks).

The question is "why nextWeather always returns THUNDER". It's complex to explain what happen. nextWeather is assigned value from asking server "what weather now". After I met the issue as same as your question in dev testing, and excluding options that may have errors in assigned method, I found the server is really answer that "is thunder now", even there is no rain or darker sky on client's gameplay. (You can check it in the latest build. I added one more debug line to output the server answer directly.) It's very weird and I don't know why, because the answer is coming from Minecraft Server. Unfortunately, I don't have the capacity to debug for Minecraft itself, so I cannot fix it.

In summary, I can only suggest that try to close the "weather pre-detect" by set it to 0 when the "clouds wall" coming again. It may avoid that.

Rivmun commented 1 year ago

The next weather change after using "/weather clear" will always be a thunderstorm Quote from https://bugs.mojang.com/browse/MC-108806

We met the issue is MinecraftServer.getWorld().getWorldProperties().isThundering() always return true when /weather rain has finish

Rivmun commented 1 year ago

I try to improve weather pre-detect function and it's probably fixed. 3deef495eb6a029e0be76ef9a9510ba65f18dcc7