Winter Wonder Land

Winter Wonder Land

698k Downloads

Snow placed in non-snow biomes builds up in rain.

RandomlyAwesome opened this issue ยท 4 comments

commented

This is due to the code only checking for snowfall status if the snow block is nonexistent.
Snow layers only occurring in places where it is possible for snow to fall is a reasonable assumption and for all I know limiting that check might be a required optimization but I thought I should point it out just in case.

commented

Which version of the mod are you using? I believe this was fixed in the last release

commented

I grabbed the 1.20 version from curseforge to test but the check that causes it is available in the current github master.It is specifically the if(layers == 0 && !world.canSnowAt(pos, true)) check in line 152 of the main file.This is because non-bitwise && and || operations in java don't evaluate the rest of the checks if the leftmost one would invalidate the entire statement.
In this case as one of them being wrong means that a state of true && true would be impossible the world.canSnowAt function isn't even called.

commented

ah crap, you are right. Let me put out a bugfix.

commented

hmm, now I remember why I did it this way.

To have N block deep snow I could not use that check. canSnowAt only works for the first layer of snow above ground.

I could duplicate some of the logic in canSnowAt, but would rather not.

A better fix would probably be looking at biome temperature (if possible), does that sound reasonable?