summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-16 21:28:30 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-16 21:28:30 +0200
commit0f6d8dcbfab074af41b46d69061b90b4a2f724f1 (patch)
treec72ea8587799c9cb80f107e7f1553aed95f5f75a /src
parentMerge pull request #3129 from LogicParrot/quietMeta (diff)
parentPrevented snow from killing grass (diff)
downloadcuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar.gz
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar.bz2
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar.lz
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar.xz
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.tar.zst
cuberite-0f6d8dcbfab074af41b46d69061b90b4a2f724f1.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;