diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-06-30 16:50:15 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-14 22:46:30 +0200 |
commit | 8656e149c8820272a882406912790f0075ed5f28 (patch) | |
tree | b4f89f69dfb026f76862046637fd99162a49d3c9 /src/Blocks/BlockStairs.h | |
parent | Merge pull request #2352 from mmdk95/master (diff) | |
download | cuberite-8656e149c8820272a882406912790f0075ed5f28.tar cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.gz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.bz2 cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.lz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.xz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.zst cuberite-8656e149c8820272a882406912790f0075ed5f28.zip |
Diffstat (limited to 'src/Blocks/BlockStairs.h')
-rw-r--r-- | src/Blocks/BlockStairs.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h index 7ef69d2ec..8a23fd064 100644 --- a/src/Blocks/BlockStairs.h +++ b/src/Blocks/BlockStairs.h @@ -17,7 +17,6 @@ public: } - virtual bool GetPlacementBlockTypeMeta( cChunkInterface & a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, @@ -54,14 +53,12 @@ public: return true; } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { // Reset meta to zero a_Pickups.push_back(cItem(m_BlockType, 1, 0)); } - static NIBBLETYPE RotationToMetaData(double a_Rotation) { a_Rotation += 90 + 45; // So its not aligned with axis @@ -92,6 +89,32 @@ public: // Toggle bit 3: return (a_Meta & 0x0b) | ((~a_Meta) & 0x04); } + + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override + { + UNUSED(a_Meta); + switch (m_BlockType) + { + case E_BLOCK_SANDSTONE_STAIRS: + case E_BLOCK_BIRCH_WOOD_STAIRS: return 2; + case E_BLOCK_QUARTZ_STAIRS: return 8; + case E_BLOCK_JUNGLE_WOOD_STAIRS: + case E_BLOCK_RED_SANDSTONE_STAIRS: return 10; + case E_BLOCK_COBBLESTONE_STAIRS: + case E_BLOCK_STONE_BRICK_STAIRS: return 11; + case E_BLOCK_OAK_WOOD_STAIRS: return 13; + case E_BLOCK_ACACIA_WOOD_STAIRS: return 15; + case E_BLOCK_DARK_OAK_WOOD_STAIRS: return 26; + case E_BLOCK_BRICK_STAIRS: return 28; + case E_BLOCK_NETHER_BRICK_STAIRS: return 35; + case E_BLOCK_SPRUCE_WOOD_STAIRS: return 34; + default: + { + ASSERT(!"Unhandled blocktype in stairs handler!"); + return 0; + } + } + } } ; |