summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockDoubleSlab.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-23 20:38:39 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-23 20:38:39 +0200
commita671e45cd55adc4ae477225e59afb2969454b1d4 (patch)
tree0fcecc0f7687ccba37482bf6f8b147ece2be15ad /source/Blocks/BlockDoubleSlab.h
parentFixed lighters replacing blocks (diff)
downloadcuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar.gz
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar.bz2
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar.lz
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar.xz
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.tar.zst
cuberite-a671e45cd55adc4ae477225e59afb2969454b1d4.zip
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockDoubleSlab.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/Blocks/BlockDoubleSlab.h b/source/Blocks/BlockDoubleSlab.h
new file mode 100644
index 000000000..c91fe64e6
--- /dev/null
+++ b/source/Blocks/BlockDoubleSlab.h
@@ -0,0 +1,36 @@
+
+#pragma once
+
+#include "BlockHandler.h"
+#include "../Items/ItemHandler.h"
+
+
+
+
+
+class cBlockDoubleSlabHandler :
+ public cBlockHandler
+{
+public:
+ cBlockDoubleSlabHandler(BLOCKTYPE a_BlockType)
+ : cBlockHandler(a_BlockType)
+ {
+ }
+
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ char Count = ((m_BlockType == E_BLOCK_DOUBLE_STONE_SLAB) || (m_BlockType == E_BLOCK_DOUBLE_WOODEN_SLAB)) ? 2 : 1;
+ a_Pickups.push_back(cItem(m_BlockType, Count, a_BlockMeta));
+ }
+
+
+ virtual const char * GetStepSound(void) override
+ {
+ return ((m_BlockType == E_BLOCK_DOUBLE_WOODEN_SLAB) || (m_BlockType == E_BLOCK_DOUBLE_WOODEN_SLAB)) ? "step.wood" : "step.stone";
+ }
+} ;
+
+
+
+