From 5b62c4c3145c08b093521e42c565922fa85de4ad Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 26 Jun 2015 17:24:51 -0500 Subject: Reorganised the redstone simulator -> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved --- src/Blocks/BlockLever.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Blocks/BlockLever.h') 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); + } } ; -- cgit v1.2.3