diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-18 12:30:23 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-22 23:30:00 +0200 |
commit | 7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04 (patch) | |
tree | 755a1e62f0b67ac4c8d059145a9e082d0cb11876 /src/Generating/StructGen.cpp | |
parent | Merge pull request #3048 from Woazboat/minecarts (diff) | |
download | cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar.gz cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar.bz2 cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar.lz cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar.xz cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.tar.zst cuberite-7f5757eccff7b81c17443ea4e0b4ce86e2d5dc04.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/StructGen.cpp | 8 |
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; } |