mojira.dev
MC-259935

It can snow even when biome precipitation is set to NONE

If a place has temperature under 0.15, it can snow, even if the biome has precipitation set to "NONE".

Steps to reproduce:
1. Add a biome to an existing or new dimension that spawns in a place with temperature less than 0.15, and set the precipitation to NONE

2. Wait for it to start raining

3. Observer the snow

Code analysis (Yarn mappings):
In Biome#doesNotSnow(), it only checks the temperature, and not the precipitation field. To fix this, there would be something added to check if the temperature is >= 0.15 OR !precipitation
Note: Some methods that rely on doesNotSnow will have side effects, like for example Biome#isCold. The old temperature check could be put there.

This might have also caused the old "desert snow" bug that could be fixed by just changing the method and not tweaking biome settings to avoid buggy places (avoiding existing bugs instead of fixing them)

Attachments

Comments 7

Same issue here. Effectively makes adding cold biomes without snow impossible. Having this fixed would be great for datapacks.

Is this still the case in 1.20.1?

No, as precipation became a boolean in 23w03a.

@Dhranios
So what? Didn't precipitation is set to false is the same as precipitation is set to NONE?

With the changes to that field came a lot of other changes, precipation false is not the same as precipation none was; false properly never does downfall.

@unknown stated that this is no longer reproducable, can you please verify that it is, or is not reproducable in 1.20.2?

If it is, please attach the data pack used.

I just popped in to say I just noticed the same issue.
When having a biome with a temp below 0.15, and precipitation set to false, snow will form on the ground even tho its not visually snowing/raining.
I saw in the remapped code the same as stated above, in `ServerLevel#tickPrecipitation()` it checks if `itsRaining` (which even tho returns true, is not correct) then goes on to check `shouldSnow` which only checks based on temperature, and NOT based on whether precipitation is true/false.

This was tested on 1.21.1

Biome from my data pack:

{
  "temperature": 0.05,
  "downfall": 0.4,
  "has_precipitation": false,
  "effects": {
    "sky_color": 16753935,
    "fog_color": 16728403,
    "water_color": 65426,
    "water_fog_color": 329011,
    "grass_color": 16749055,
    "foliage_color": 15527168
  },
  "spawners": {},
  "spawn_costs": {},
  "carvers": {},
  "features": []
}

visual example, you can see snow forming on the ground, yet it is not "snowing".

(ok, so the pic is above, doesn't go here apparently)

PatrickMSM

slicedlime

Community Consensus

Platform

Normal

Custom Worlds

1.19.3, 1.21.1

Future Update

Retrieved