summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockButton.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-21 23:44:18 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-21 23:44:18 +0100
commit314884d9bbd5ec1edf0ec473a1c29b493964f955 (patch)
tree630ff13b87592467ff509a55ce694768f6c8779d /source/Blocks/BlockButton.h
parentMultiple bugfixes [SEE DESC] (diff)
downloadcuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar.gz
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar.bz2
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar.lz
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar.xz
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.tar.zst
cuberite-314884d9bbd5ec1edf0ec473a1c29b493964f955.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockButton.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/Blocks/BlockButton.h b/source/Blocks/BlockButton.h
index 15649acc0..e2c60002b 100644
--- a/source/Blocks/BlockButton.h
+++ b/source/Blocks/BlockButton.h
@@ -81,10 +81,13 @@ public:
virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ);
+ NIBBLETYPE Meta;
+ a_Chunk.UnboundedRelGetBlockMeta(a_RelX, a_RelY, a_RelZ, Meta);
AddFaceDirection(a_RelX, a_RelY, a_RelZ, BlockMetaDataToBlockFace(Meta), true);
- return (a_RelY > 0) && (g_BlockIsSolid[a_Chunk.GetBlock(a_RelX, a_RelY, a_RelZ)]);
+ BLOCKTYPE BlockIsOn; a_Chunk.UnboundedRelGetBlockType(a_RelX, a_RelY, a_RelZ, BlockIsOn);
+
+ return (a_RelY > 0) && (g_BlockIsSolid[BlockIsOn]);
}
} ;