summaryrefslogtreecommitdiffstats
path: root/src/Generating/StructGen.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-23 00:28:25 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-23 00:28:25 +0200
commit932c59ee38ac29a300962ab0d2f35362a2deb485 (patch)
tree755a1e62f0b67ac4c8d059145a9e082d0cb11876 /src/Generating/StructGen.cpp
parentMerge pull request #3048 from Woazboat/minecarts (diff)
parentReduced unnecessary block updates (diff)
downloadcuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar.gz
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar.bz2
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar.lz
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar.xz
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.tar.zst
cuberite-932c59ee38ac29a300962ab0d2f35362a2deb485.zip
Diffstat (limited to 'src/Generating/StructGen.cpp')
-rw-r--r--src/Generating/StructGen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp
index 9b4eb67ef..c1e6906fc 100644
--- a/src/Generating/StructGen.cpp
+++ b/src/Generating/StructGen.cpp
@@ -183,6 +183,14 @@ void cStructGenTrees::ApplyTreeImage(
CASE_TREE_OVERWRITTEN_BLOCKS:
{
a_ChunkDesc.SetBlockTypeMeta(itr->m_RelX, itr->m_RelY, itr->m_RelZ, itr->m_BlockType, itr->m_BlockMeta);
+ // If grass is below our tree, turn it to dirt
+ if (
+ (cBlockInfo::IsSolid(itr->m_BlockType)) &&
+ (a_ChunkDesc.GetBlockType(itr->m_RelX, itr->m_RelY - 1, itr->m_RelZ) == E_BLOCK_GRASS)
+ )
+ {
+ a_ChunkDesc.SetBlockType(itr->m_RelX, itr->m_RelY - 1, itr->m_RelZ, E_BLOCK_DIRT);
+ }
break;
}