summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp8
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))