1
0

Snow only generates on blocks with a block light level of 10 or less (#3931)

This commit is contained in:
Bond-009 2017-08-21 15:13:18 +02:00 committed by Mattes D
parent ce87b73127
commit d510c977f6

View File

@ -916,7 +916,6 @@ void cChunk::ApplyWeatherToTop()
int X = m_World->GetTickRandomNumber(15);
int Z = m_World->GetTickRandomNumber(15);
// TODO: Check light levels, don't snow over when the BlockLight is higher than (7?)
int Height = GetHeight(X, Z);
if (GetSnowStartHeight(GetBiomeAt(X, Z)) > Height)
@ -924,6 +923,13 @@ void cChunk::ApplyWeatherToTop()
return;
}
if (GetBlockLight(X, Height, Z) > 10)
{
// Snow only generates on blocks with a block light level of 10 or less.
// Ref: https://minecraft.gamepedia.com/Snow_(layer)#Snowfall
return;
}
BLOCKTYPE TopBlock = GetBlock(X, Height, Z);
NIBBLETYPE TopMeta = GetMeta (X, Height, Z);
if (m_World->IsDeepSnowEnabled() && (TopBlock == E_BLOCK_SNOW))