diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-02-27 20:33:35 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-02-27 20:33:35 +0100 |
commit | 84913299f45a28d3bd6146b3decbf14764449030 (patch) | |
tree | 02707f55323bb35f4d0de65a376ba10e3a1fb5e4 /src/Blocks/BlockDoor.h | |
parent | Fixed crash and some warnings in map handling. (diff) | |
download | cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar.gz cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar.bz2 cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar.lz cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar.xz cuberite-84913299f45a28d3bd6146b3decbf14764449030.tar.zst cuberite-84913299f45a28d3bd6146b3decbf14764449030.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockDoor.h | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h index ef0dbb787..c3647b203 100644 --- a/src/Blocks/BlockDoor.h +++ b/src/Blocks/BlockDoor.h @@ -9,8 +9,9 @@ class cBlockDoorHandler : - public cBlockHandler + public cMetaRotater<cBlockHandler,0x03,0x01,0x02,0x03,0x00> { + typedef super cMetaRotater<cBlockHandler,0x03,0x01,0x02,0x03,0x00>; public: cBlockDoorHandler(BLOCKTYPE a_BlockType); @@ -167,6 +168,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); + } + } + } ; |