The weather in the game is globalized, meaning if it's raining - it's raining everywhere in the world at once. And "raining" in this case means that the weather isn't "clear" so to speak. So you can absolutely keep this method:
However when it comes to snow it's a bit different. You see, if it's supposed to be snowing in the biome instead of raining then the World#isRainingAt will return false. It will also return false if you go high enough so the rain becomes snow. So you need to account for these too. Basically I would have separate checks to determine the weather at the current spot:
public enum EnumWeather
{
CLEAR,
SNOW,
RAIN,
DRY
}
public static EnumWeather getWeatherAt(EntityPlayer player)
{
World world = player.world;
BlockPos pos = player.getPosition();
if (!world.isRaining())
{
// If it isn't raining at all in the world it means that the weather is clear everywhere in the world.
return EnumWeather.CLEAR;
}
Biome biome = world.getBiome(pos);
if (!biome.isSnowyBiome() && !biome.canRain())
{
// If the biome can't have rain nor snow then it's a dry biome like a desert where it never rains.
return EnumWeather.DRY;
}
boolean isSnowingAtHeight = world.getBiomeProvider().getTemperatureAtHeight(biome.getTemperature(pos), pos.getY()) < 0.15F;
if (isSnowingAtHeight)
{
// If the adjusted temperature is less than 0.15 then it is snowing here.
// And before you tell me about Biome#isSnowyBiome - all the logic is taken from EntityRenderer#renderRainSnow. It doesn't care whether the biome is a "snowy" one to render the snow effects - it only cares about the temperature at a given location.
return EnumWeather.SNOW;
}
// If all other options are out then it must be raining
return EnumWeather.RAIN;
}
Any particular reason you are using a forge version that is soon to be a year old? You should update.