summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockButton.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-28 19:59:44 +0100
committerMattes D <github@xoft.cz>2013-11-28 19:59:44 +0100
commit13dade5a83afec03df1101ebfbea928a59e1f420 (patch)
tree2366cc39fd0811fe3e9b5fabd129a2d1fef84edc /src/Blocks/BlockButton.h
parentMerge pull request #374 from mc-server/VS2013compilefix (diff)
parentFixed a bug with TNT waking simulators (diff)
downloadcuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.gz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.bz2
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.lz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.xz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.zst
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.zip
Diffstat (limited to 'src/Blocks/BlockButton.h')
-rw-r--r--src/Blocks/BlockButton.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index 15649acc0..e2c60002b 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/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]);
}
} ;