From 8dc54301a4f0c1d92d9775c3f97901acbf0230f6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 26 Mar 2013 21:06:12 +0000 Subject: BlockArea: Finished rotation and mirroring with meta. Implemented example meta handling for vines, stairs and torches. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1319 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Blocks/BlockHandler.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/Blocks/BlockHandler.h') diff --git a/source/Blocks/BlockHandler.h b/source/Blocks/BlockHandler.h index 4c91463bc..cb52be497 100644 --- a/source/Blocks/BlockHandler.h +++ b/source/Blocks/BlockHandler.h @@ -112,6 +112,21 @@ public: */ virtual void Check(int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk); + /// Returns the meta for a block after rotating it counter-clockwise from the specified meta. Default: no change + virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) { return a_Meta; } + + /// Returns the meta for a block after rotating it clockwise from the specified meta. Default: no change + virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) { return a_Meta; } + + /// Returns the meta for a block after mirroring it around the XY plane. Default: no change + virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) { return a_Meta; } + + /// Returns the meta for a block after mirroring it around the XZ plane. Default: no change + virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) { return a_Meta; } + + /// Returns the meta for a block after mirroring it around the YZ plane. Default: no change + virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) { return a_Meta; } + /// Get the blockhandler for a specific block id static cBlockHandler * GetBlockHandler(BLOCKTYPE a_BlockType); -- cgit v1.2.3