diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2015-12-19 22:20:56 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2015-12-19 22:20:56 +0100 |
commit | b8752bb26e91bcdcebfb8dd43e5794251ff70a89 (patch) | |
tree | 95048f5a2a833c1d43785f6eaea070627c2b9ebe /src/Blocks/BlockLever.h | |
parent | Merge pull request #2776 from cuberite/AtomicBoolIsthread (diff) | |
parent | Reorganised the redstone simulator (diff) | |
download | cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.gz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.bz2 cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.lz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.xz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.zst cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.zip |
Diffstat (limited to 'src/Blocks/BlockLever.h')
-rw-r--r-- | src/Blocks/BlockLever.h | 6 |
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); + } } ; |