diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-09 19:02:30 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-09 19:02:30 +0100 |
commit | b5e33c5424c0b148a7076bb0f3019cfb0ef9c824 (patch) | |
tree | dabb3041abd9b8513570111310903992254d8063 /src/Blocks/BlockDoor.h | |
parent | Fix IsThread destructor (diff) | |
parent | Fixed #778 - stack overflow.com (diff) | |
download | cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar.gz cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar.bz2 cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar.lz cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar.xz cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.tar.zst cuberite-b5e33c5424c0b148a7076bb0f3019cfb0ef9c824.zip |
Diffstat (limited to 'src/Blocks/BlockDoor.h')
-rw-r--r-- | src/Blocks/BlockDoor.h | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h index 68be2c658..981774c17 100644 --- a/src/Blocks/BlockDoor.h +++ b/src/Blocks/BlockDoor.h @@ -4,13 +4,15 @@ #include "BlockHandler.h" #include "../Entities/Player.h" #include "Chunk.h" +#include "MetaRotater.h" class cBlockDoorHandler : - public cBlockHandler + public cMetaRotater<cBlockHandler, 0x03, 0x01, 0x02, 0x03, 0x00, true> { + typedef cMetaRotater<cBlockHandler, 0x03, 0x01, 0x02, 0x03, 0x00, true> super; public: cBlockDoorHandler(BLOCKTYPE a_BlockType); @@ -168,6 +170,60 @@ public: } + virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override + { + if (a_Meta & 0x08) + { + return a_Meta; + } + else + { + return super::MetaRotateCCW(a_Meta); + } + } + + + + virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override + { + if (a_Meta & 0x08) + { + return a_Meta; + } + else + { + return super::MetaRotateCW(a_Meta); + } + } + + + + virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override + { + if (a_Meta & 0x08) + { + return a_Meta; + } + else + { + return super::MetaMirrorXY(a_Meta); + } + } + + + + virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override + { + if (a_Meta & 0x08) + { + return a_Meta; + } + else + { + return super::MetaMirrorYZ(a_Meta); + } + } + } ; |