diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
commit | c390604bc1343705ee17d6466da8dc53b5fa3b0e (patch) | |
tree | cbf9db66aae0fd8a85c88b0b1ef5ae9aea4d20ea /src/Blocks/BlockStairs.h | |
parent | Merge pull request #2036 from cuberite/sign-metamirror (diff) | |
parent | Improved maps (diff) | |
download | cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.gz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.bz2 cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.lz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.xz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.zst cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.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; + } + } + } } ; |