summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockSlab.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-26 15:49:53 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-26 15:49:53 +0200
commiteaf36766f60662a0aa7829ae3d96f47fd91b408d (patch)
tree3075c09f947dfbaff163c405c74f518a8064ea89 /src/Blocks/BlockSlab.h
parentderp (diff)
parentMerge pull request #1126 from mc-server/BlockInfoInit (diff)
downloadcuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar.gz
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar.bz2
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar.lz
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar.xz
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.tar.zst
cuberite-eaf36766f60662a0aa7829ae3d96f47fd91b408d.zip
Diffstat (limited to 'src/Blocks/BlockSlab.h')
-rw-r--r--src/Blocks/BlockSlab.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index 80841b094..6c861be86 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -80,6 +80,7 @@ public:
if (IsAnySlabType(a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ)))
{
a_BlockType = GetDoubleSlabType(m_BlockType);
+ a_BlockMeta = a_BlockMeta & 0x7;
}
return true;
@@ -123,6 +124,12 @@ public:
return E_BLOCK_AIR;
}
+
+ virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
+ {
+ // Toggle the 4th bit - up / down:
+ return (a_Meta ^ 0x08);
+ }
} ;
@@ -166,15 +173,6 @@ public:
ASSERT(!"Unhandled double slab type!");
return "";
}
-
-
- virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
- {
- NIBBLETYPE OtherMeta = a_Meta & 0x07; // Contains unrelated meta data.
-
- // 8th bit is up/down. 1 right-side-up, 0 is up-side-down.
- return (a_Meta & 0x08) ? 0x00 + OtherMeta : 0x01 + OtherMeta;
- }
} ;