summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDirt.h
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2015-07-03 21:05:02 +0200
committerSamuel Barney <samjbarney@gmail.com>2015-07-03 21:05:02 +0200
commitba0577bbd0913c381124ab0695d767efa8d26ffa (patch)
tree604fb911a62ba9fe62b1eeea95b9709ed5416ce5 /src/Blocks/BlockDirt.h
parentAdded missing parens (diff)
downloadcuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar.gz
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar.bz2
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar.lz
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar.xz
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.tar.zst
cuberite-ba0577bbd0913c381124ab0695d767efa8d26ffa.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockDirt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index 335aef08a..3d671d218 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -50,14 +50,15 @@ public:
else if ((a_RelY < cChunkDef::Height - 1))
{
BLOCKTYPE above = a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ);
- NIBBLETYPE light = std::max(a_Chunk.GetBlockLight(a_RelX, a_RelY + 1, a_RelZ), a_Chunk.GetTimeAlteredLight(a_Chunk.GetSkyLight(a_RelX, a_RelY + 1, a_RelZ)));
- // Grass turns back to dirt when light levels are below 5 and the block above is not transparent
+
+ // Grass turns back to dirt when the block above is not transparent
if (!cBlockInfo::IsTransparent(above))
{
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_DIRT, E_META_DIRT_NORMAL);
return;
}
-
+
+ NIBBLETYPE light = std::max(a_Chunk.GetBlockLight(a_RelX, a_RelY + 1, a_RelZ), a_Chunk.GetTimeAlteredLight(a_Chunk.GetSkyLight(a_RelX, a_RelY + 1, a_RelZ)));
// Source block is not bright enough to spread
if (light < 9)
{