summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLever.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-27 00:24:51 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-12-18 14:17:38 +0100
commit5b62c4c3145c08b093521e42c565922fa85de4ad (patch)
treedca8cbfe86aa27af174da21f6835a8fbbe83d248 /src/Blocks/BlockLever.h
parentMerge pull request #2770 from cuberite/RemoveChunkDataCollector (diff)
downloadcuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.gz
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.bz2
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.lz
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.xz
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.tar.zst
cuberite-5b62c4c3145c08b093521e42c565922fa85de4ad.zip
Diffstat (limited to 'src/Blocks/BlockLever.h')
-rw-r--r--src/Blocks/BlockLever.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 85fd2f28d..a3bbd54f5 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -156,6 +156,12 @@ public:
UNUSED(a_Meta);
return 0;
}
+
+ /** Extracts the ON bit from metadata and returns if true if it is set */
+ static bool IsLeverOn(NIBBLETYPE a_BlockMeta)
+ {
+ return ((a_BlockMeta & 0x8) == 0x8);
+ }
} ;