diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-10-07 16:48:37 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-10-07 16:48:37 +0200 |
commit | e8e428a806173cc293f98beea1a8a88e95b4d101 (patch) | |
tree | 078095526b50af967a73c7ba8b8a9b5d2fff49bc /src | |
parent | Removed BlockHaybale.h from CMakeLists.txt (diff) | |
download | cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar.gz cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar.bz2 cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar.lz cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar.xz cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.tar.zst cuberite-e8e428a806173cc293f98beea1a8a88e95b4d101.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Blocks/BlockVine.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h index 06d84f2d4..7aa0378c7 100644 --- a/src/Blocks/BlockVine.h +++ b/src/Blocks/BlockVine.h @@ -23,10 +23,6 @@ public: BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta ) override { - UNUSED(a_Player); - UNUSED(a_CursorX); - UNUSED(a_CursorY); - UNUSED(a_CursorZ); // TODO: Disallow placement where the vine doesn't attach to something properly BLOCKTYPE BlockType = 0; NIBBLETYPE BlockMeta; @@ -80,7 +76,21 @@ public: /// Returns true if the specified block type is good for vines to attach to static bool IsBlockAttachable(BLOCKTYPE a_BlockType) { - return ((a_BlockType == E_BLOCK_LEAVES) || (a_BlockType == E_BLOCK_NEW_LEAVES) || cBlockInfo::IsSolid(a_BlockType)); + switch (a_BlockType) + { + case E_BLOCK_GLASS: + case E_BLOCK_STAINED_GLASS: + case E_BLOCK_CHEST: + case E_BLOCK_TRAPPED_CHEST: + { + // You can't attach a vine to this solid blocks. + return false; + } + default: + { + return cBlockInfo::IsSolid(a_BlockType); + } + } } |