From 4311f4a658fe2bef362aeb9b4bdbcd59c9617ad6 Mon Sep 17 00:00:00 2001 From: mathiascode Date: Tue, 14 Feb 2017 12:13:55 +0200 Subject: Added some blocks and items (#3503) --- src/Blocks/BlockSlab.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/Blocks/BlockSlab.h') diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h index c75dee50d..01e9e701d 100644 --- a/src/Blocks/BlockSlab.h +++ b/src/Blocks/BlockSlab.h @@ -88,7 +88,12 @@ public: /** Returns true if the specified blocktype is one of the slabs handled by this handler */ static bool IsAnySlabType(BLOCKTYPE a_BlockType) { - return ((a_BlockType == E_BLOCK_WOODEN_SLAB) || (a_BlockType == E_BLOCK_STONE_SLAB) || (a_BlockType == E_BLOCK_RED_SANDSTONE_SLAB)); + return ( + (a_BlockType == E_BLOCK_WOODEN_SLAB) || + (a_BlockType == E_BLOCK_STONE_SLAB) || + (a_BlockType == E_BLOCK_RED_SANDSTONE_SLAB) || + (a_BlockType == E_BLOCK_PURPUR_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 @@ -110,6 +115,7 @@ public: case E_BLOCK_STONE_SLAB: return E_BLOCK_DOUBLE_STONE_SLAB; case E_BLOCK_WOODEN_SLAB: return E_BLOCK_DOUBLE_WOODEN_SLAB; case E_BLOCK_RED_SANDSTONE_SLAB: return E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB; + case E_BLOCK_PURPUR_SLAB: return E_BLOCK_PURPUR_DOUBLE_SLAB; } ASSERT(!"Unhandled slab type!"); return E_BLOCK_AIR; @@ -167,6 +173,10 @@ public: { return 10; } + case E_BLOCK_PURPUR_SLAB: + { + return 16; + } default: { ASSERT(!"Unhandled blocktype in slab handler!"); @@ -211,6 +221,7 @@ public: case E_BLOCK_DOUBLE_STONE_SLAB: return E_BLOCK_STONE_SLAB; case E_BLOCK_DOUBLE_WOODEN_SLAB: return E_BLOCK_WOODEN_SLAB; case E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB: return E_BLOCK_RED_SANDSTONE_SLAB; + case E_BLOCK_PURPUR_DOUBLE_SLAB: return E_BLOCK_PURPUR_SLAB; } ASSERT(!"Unhandled double slab type!"); return a_BlockType; -- cgit v1.2.3