diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockPiston.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h index 8799ba3ca..f8d155196 100644 --- a/src/Blocks/BlockPiston.h +++ b/src/Blocks/BlockPiston.h @@ -22,13 +22,7 @@ class cBlockPistonHandler: public: - cBlockPistonHandler(BLOCKTYPE a_BlockType); - - virtual void OnBroken( - cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, - Vector3i a_BlockPos, - BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta - ) override; + using Super::Super; static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData) { @@ -54,12 +48,6 @@ public: static void ExtendPiston(Vector3i a_BlockPos, cWorld & a_World); static void RetractPiston(Vector3i a_BlockPos, cWorld & a_World); - virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override - { - UNUSED(a_Meta); - return 11; - } - /** Returns true if the piston (with the specified meta) is extended */ static inline bool IsExtended(NIBBLETYPE a_PistonMeta) { return ((a_PistonMeta & 0x8) != 0x0); } @@ -131,6 +119,18 @@ private: Vector3iSet & a_BlocksPushed, const Vector3i & a_PushDir ); + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override + { + UNUSED(a_Meta); + return 11; + } + + virtual void OnBroken( + cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, + Vector3i a_BlockPos, + BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta + ) const override; + /** Moves a list of blocks in a specific direction */ static void PushBlocks(const Vector3iSet & a_BlocksToPush, cWorld & a_World, const Vector3i & a_PushDir @@ -147,13 +147,17 @@ class cBlockPistonHeadHandler: using Super = cBlockHandler; public: - cBlockPistonHeadHandler(void); + + constexpr cBlockPistonHeadHandler(void) : + Super(E_BLOCK_PISTON_EXTENSION) + { + } virtual void OnBroken( cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta - ) override; + ) const override; - virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override; + virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override; } ; |