-
Bug
-
Resolution: Fixed
-
1.19.2, 22w42a, 22w43a, 22w44a, 22w45a, 22w46a, 1.19.3 Pre-release 2, 1.19.3
-
Confirmed
-
Block states
-
Normal
-
Platform
The bug
In frozen biomes, it looks like it's raining in some places and snowing in other places. But where it looks like it's raining, there are some glitches.
- Cauldrons catch powder snow instead of water (
MC-230678) - No particles when hit block.
- No snow layer and ice generating when ticking chunks
- Farmland cannot get water
- Riptide trident doesn't work (
MC-247836) - Zombies still burn in the daytime (
MC-233893) - Endermen, snow golems, blazes and striders do not take damage
- and so on
Code analysis
The reason is because the snowy (Biome.Precipitation.SNOW in the code) biomes can't rain (Level.isRainingAt in the code), but the frozen (Biome.TemperatureModifier.FROZEN) biomes are warm enough to rain at random places.
Using Mojang mappings, 22w42a: In Level#isRainingAt(BlockPos):
... public boolean isRainingAt(BlockPos $$0) { if (!this.isRaining()) { return false; } if (!this.canSeeSky($$0)) { return false; } if (this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, $$0).getY() > $$0.getY()) { return false; } Biome $$1 = this.getBiome($$0).value(); return $$1.getPrecipitation() == Biome.Precipitation.RAIN && $$1.warmEnoughToRain($$0); } ...
We can see that the function only returns true if the biome precipitation is RAIN. Frozen oceans have a biome precipitation of SNOW, so this will always be false for frozen oceans. This return statement should probably be changed to something like
return ($$1.getPrecipitation() == Biome.Precipitation.RAIN || $$1.getPrecipitation() == Biome.Precipitation.SNOW) && $$1.warmEnoughToRain($$0);
How to reproduce
- Create a new flat world with preset string:
minecraft:bedrock,5*minecraft:stone;minecraft:frozen_ocean
- Run /weather rain
- Find a places where it's raining rather than snowing
Attachments: