summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockVine.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Blocks/BlockVine.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/source/Blocks/BlockVine.h b/source/Blocks/BlockVine.h
index 88338e86d..67376a4d8 100644
--- a/source/Blocks/BlockVine.h
+++ b/source/Blocks/BlockVine.h
@@ -138,10 +138,36 @@ public:
}
- bool DoesDropOnUnsuitable(void)
+ virtual bool DoesDropOnUnsuitable(void) override
{
return false;
}
+
+
+ virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override
+ {
+ return ((a_Meta >> 1) | (a_Meta << 3)) & 0x0f; // Rotate bits to the right
+ }
+
+
+ virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override
+ {
+ return ((a_Meta << 1) | (a_Meta >> 3)) & 0x0f; // Rotate bits to the left
+ }
+
+
+ virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
+ {
+ // Bits 2 and 4 stay, bits 1 and 3 swap
+ return ((a_Meta & 0x0a) | ((a_Meta & 0x01) << 2) | ((a_Meta & 0x04) >> 2));
+ }
+
+
+ virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override
+ {
+ // Bits 1 and 3 stay, bits 2 and 4 swap
+ return ((a_Meta & 0x05) | ((a_Meta & 0x02) << 2) | ((a_Meta & 0x08) >> 2));
+ }
} ;