summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockSnow.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-30 22:13:13 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-30 22:13:13 +0100
commit67b5a417e35febeb211d29320197d5f1ac2ba291 (patch)
tree2de5132e2a0cdadcb73e3ec590e2ba095405914f /src/Blocks/BlockSnow.h
parentFixed signs and added missing blocks to sand simulators list (diff)
downloadcuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar.gz
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar.bz2
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar.lz
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar.xz
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.tar.zst
cuberite-67b5a417e35febeb211d29320197d5f1ac2ba291.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockSnow.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Blocks/BlockSnow.h b/src/Blocks/BlockSnow.h
index 7b6094c9f..4f1712974 100644
--- a/src/Blocks/BlockSnow.h
+++ b/src/Blocks/BlockSnow.h
@@ -67,19 +67,16 @@ public:
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- if (a_RelY > 0)
+ 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 (cBlockInfo::IsSnowable(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;
}
-
- return false;
+
+ 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 block below is snowable, or it is a thin slow block and has a meta of 7 (full thin snow block), say yay
+ return (cBlockInfo::IsSnowable(BlockBelow) || ((BlockBelow == E_BLOCK_SNOW) && (MetaBelow == 7)));
}