summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockBigFlower.h
diff options
context:
space:
mode:
authorAltenius <jacobjm18@gmail.com>2017-01-21 03:30:19 +0100
committerMattes D <github@xoft.cz>2017-01-28 13:55:38 +0100
commit2d376304c2b14182e5088d39b2bad3a2a3d1bbc5 (patch)
tree62f5cb72a46b34f73ff5fdbf2c57cd6a616e7577 /src/Blocks/BlockBigFlower.h
parentDebuggers: Added /clientversion command to display protocol version. (diff)
downloadcuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar.gz
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar.bz2
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar.lz
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar.xz
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.tar.zst
cuberite-2d376304c2b14182e5088d39b2bad3a2a3d1bbc5.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockBigFlower.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Blocks/BlockBigFlower.h b/src/Blocks/BlockBigFlower.h
index 7a70a7a6b..449083c87 100644
--- a/src/Blocks/BlockBigFlower.h
+++ b/src/Blocks/BlockBigFlower.h
@@ -77,7 +77,10 @@ public:
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) != E_BLOCK_AIR) && (a_RelY < cChunkDef::Height - 1) && ((a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ) == E_BLOCK_AIR) || (a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ) == E_BLOCK_BIG_FLOWER)));
+ BLOCKTYPE BlockType;
+ NIBBLETYPE BlockMeta;
+ a_Chunk.GetBlockTypeMeta(a_RelX, a_RelY - 1, a_RelZ, BlockType, BlockMeta);
+ return ((a_RelY > 0) && (IsBlockTypeOfDirt(BlockType) || ((BlockType == E_BLOCK_BIG_FLOWER) && !(BlockMeta & 0x08))) && (a_RelY < cChunkDef::Height - 1) && ((a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ) == E_BLOCK_AIR) || (a_Chunk.GetBlock(a_RelX, a_RelY + 1, a_RelZ) == E_BLOCK_BIG_FLOWER)));
}
virtual void OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ) override