Snow only generates on blocks with a block light level of 10 or less (#3931)
This commit is contained in:
parent
ce87b73127
commit
d510c977f6
@ -916,7 +916,6 @@ void cChunk::ApplyWeatherToTop()
|
|||||||
int X = m_World->GetTickRandomNumber(15);
|
int X = m_World->GetTickRandomNumber(15);
|
||||||
int Z = 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);
|
int Height = GetHeight(X, Z);
|
||||||
|
|
||||||
if (GetSnowStartHeight(GetBiomeAt(X, Z)) > Height)
|
if (GetSnowStartHeight(GetBiomeAt(X, Z)) > Height)
|
||||||
@ -924,6 +923,13 @@ void cChunk::ApplyWeatherToTop()
|
|||||||
return;
|
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);
|
BLOCKTYPE TopBlock = GetBlock(X, Height, Z);
|
||||||
NIBBLETYPE TopMeta = GetMeta (X, Height, Z);
|
NIBBLETYPE TopMeta = GetMeta (X, Height, Z);
|
||||||
if (m_World->IsDeepSnowEnabled() && (TopBlock == E_BLOCK_SNOW))
|
if (m_World->IsDeepSnowEnabled() && (TopBlock == E_BLOCK_SNOW))
|
||||||
|
Loading…
Reference in New Issue
Block a user