diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-30 12:45:23 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-30 12:45:23 +0100 |
commit | ab382ef6b48b6a5b3714200cbc70563be7a83093 (patch) | |
tree | 6f1971b03f69f854445728f57c74ffbf0d80d7f8 /src/Blocks/BlockSnow.h | |
parent | Properly fixed snow height, fixes #98 and #264 (diff) | |
download | cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar.gz cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar.bz2 cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar.lz cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar.xz cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.tar.zst cuberite-ab382ef6b48b6a5b3714200cbc70563be7a83093.zip |
Diffstat (limited to 'src/Blocks/BlockSnow.h')
-rw-r--r-- | src/Blocks/BlockSnow.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Blocks/BlockSnow.h b/src/Blocks/BlockSnow.h index dd4c49fb2..d7fd1e19e 100644 --- a/src/Blocks/BlockSnow.h +++ b/src/Blocks/BlockSnow.h @@ -67,7 +67,19 @@ public: virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { - return (a_RelY > 0) && g_BlockIsSnowable[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)]; + if (a_RelY > 0) + { + BLOCKTYPE BlockBelow = a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ); + NIBBLETYPE MetaBelow = a_Chunk.GetMeta(a_RelX, a_RelY - 1, a_RelZ); + + if (g_BlockIsSnowable[BlockBelow] || ((BlockBelow == E_BLOCK_SNOW) && (MetaBelow == 7))) + { + // If block below is snowable, or it is a thin slow block and has a meta of 7 (full thin snow block), say yay + return true; + } + } + + return false; } |