summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDirt.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-16 20:50:13 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-16 20:54:35 +0200
commitc921f47d85bf09e1d07562dc9763bd7b71875bbe (patch)
treec72ea8587799c9cb80f107e7f1553aed95f5f75a /src/Blocks/BlockDirt.h
parentMerge pull request #3129 from LogicParrot/quietMeta (diff)
downloadcuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar.gz
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar.bz2
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar.lz
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar.xz
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.tar.zst
cuberite-c921f47d85bf09e1d07562dc9763bd7b71875bbe.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockDirt.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index a06d9d030..33325d53a 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -51,8 +51,10 @@ public:
{
BLOCKTYPE above = a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ);
- // Grass turns back to dirt when the block above it is not transparent or water
- if (!cBlockInfo::IsTransparent(above) || IsBlockWater(above))
+ // Grass turns back to dirt when the block above it is not transparent or water.
+ // It does not turn to dirt when a snow layer is above.
+ if ((above != E_BLOCK_SNOW) &&
+ (!cBlockInfo::IsTransparent(above) || IsBlockWater(above)))
{
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_DIRT, E_META_DIRT_NORMAL);
return;