summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-08 18:55:05 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-08 18:55:05 +0200
commit3d68466ab03c3f7f2879451a57acba65ed5b197f (patch)
tree3ef51a814a21485ee8cd8bf23ad370e06faa0e67 /src
parentMerge pull request #1295 from mc-server/crystal (diff)
downloadcuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar.gz
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar.bz2
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar.lz
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar.xz
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.tar.zst
cuberite-3d68466ab03c3f7f2879451a57acba65ed5b197f.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockSlab.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index 214445eda..28fdbe7af 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -110,6 +110,17 @@ public:
{
return ((a_BlockType == E_BLOCK_WOODEN_SLAB) || (a_BlockType == E_BLOCK_STONE_SLAB));
}
+
+
+ virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
+ {
+ if ((a_BlockFace == BLOCK_FACE_NONE) || (a_Player->GetEquippedItem().m_ItemType != (short)m_BlockType))
+ {
+ return;
+ }
+
+ a_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);
+ }
/// Converts the single-slab blocktype to its equivalent double-slab blocktype