summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDirt.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-30 13:48:22 +0100
committermadmaxoft <github@xoft.cz>2013-11-30 13:48:22 +0100
commit463de118a02baa1500d7fbcdbafb8510cd3ee0ff (patch)
tree90f090a8b8b365c579b984dbbf131f72e44922f6 /src/Blocks/BlockDirt.h
parentAPIDump: Updated the project file to include all partial docs files. (diff)
downloadcuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar.gz
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar.bz2
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar.lz
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar.xz
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.tar.zst
cuberite-463de118a02baa1500d7fbcdbafb8510cd3ee0ff.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockDirt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index c694d79f6..a98199977 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -44,7 +44,7 @@ public:
}
}
- // Grass spreads to adjacent blocks:
+ // Grass spreads to adjacent dirt blocks:
MTRand rand;
for (int i = 0; i < 2; i++) // Pick two blocks to grow to
{
@@ -60,8 +60,9 @@ public:
continue;
}
bool IsValid = a_World->GetBlockTypeMeta(a_BlockX + OfsX, a_BlockY + OfsY, a_BlockZ + OfsZ, DestBlock, DestMeta);
- if (!IsValid || (DestBlock != E_BLOCK_DIRT))
+ if (!IsValid || (DestBlock != E_BLOCK_DIRT) || (DestMeta != E_META_DIRT_NORMAL))
{
+ // Not a regular dirt block, or in an unloaded chunk
continue;
}