diff options
author | Bond-009 <bond.009@outlook.com> | 2017-08-21 15:13:18 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-21 15:13:18 +0200 |
commit | d510c977f6ceca0c986619ee8ee39023ecbd4c88 (patch) | |
tree | b246132cd71c8460b255968c32818c7310bf1130 | |
parent | Fixed build for older clang versions (#3935) (diff) | |
download | cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar.gz cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar.bz2 cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar.lz cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar.xz cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.tar.zst cuberite-d510c977f6ceca0c986619ee8ee39023ecbd4c88.zip |
-rw-r--r-- | src/Chunk.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 95fb55ecb..78a8461d3 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -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)) |