summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockCactus.h
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-07-18 15:14:52 +0200
committerLukas Pioch <lukas@zgow.de>2017-07-18 15:14:52 +0200
commitf9b56dd859b97dd9af5f2a0c7050270d7a44b525 (patch)
treeafc54f07237b6cb1cfab0624bd61c80f2a029fc5 /src/Blocks/BlockCactus.h
parentMade cBlockHandler OnPlacedByPlayer call OnPlaced, made BlockRailHandler use NeighborChanged instead of OnNeighborChanged. (diff)
downloadcuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar.gz
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar.bz2
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar.lz
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar.xz
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.tar.zst
cuberite-f9b56dd859b97dd9af5f2a0c7050270d7a44b525.zip
Diffstat (limited to 'src/Blocks/BlockCactus.h')
-rw-r--r--src/Blocks/BlockCactus.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Blocks/BlockCactus.h b/src/Blocks/BlockCactus.h
index 29e86d085..371402423 100644
--- a/src/Blocks/BlockCactus.h
+++ b/src/Blocks/BlockCactus.h
@@ -36,7 +36,7 @@ public:
return false;
}
- // Check surroundings. Cacti may ONLY be surrounded by air
+ // Check surroundings. Cacti may ONLY be surrounded by non-solid blocks
static const struct
{
int x, z;
@@ -53,7 +53,11 @@ public:
NIBBLETYPE BlockMeta;
if (
a_Chunk.UnboundedRelGetBlock(a_RelX + Coords[i].x, a_RelY, a_RelZ + Coords[i].z, BlockType, BlockMeta) &&
- cBlockInfo::IsSolid(BlockType)
+ (
+ cBlockInfo::IsSolid(BlockType) ||
+ (BlockType == E_BLOCK_LAVA) ||
+ (BlockType == E_BLOCK_STATIONARY_LAVA)
+ )
)
{
return false;