Redstone fixes (#3285)

* Comparators and pistons no longer update instantly
* Fixes #3168.
* Consolidated comparator code
* As a result, fixed an issue where GetPowerLevel didn't consider block
entities behind it (only GetFrontPowerLevel did)
This commit is contained in:
Tiger Wang
2016-07-31 21:54:35 +01:00
committed by GitHub
parent a4ca689974
commit d46f7ce2c8
4 changed files with 102 additions and 58 deletions
+10
View File
@@ -60,6 +60,16 @@ public:
return true;
}
inline static bool IsInSubtractionMode(NIBBLETYPE a_Meta)
{
return ((a_Meta & 0x4) == 0x4);
}
inline static bool IsOn(NIBBLETYPE a_Meta)
{
return ((a_Meta & 0x8) == 0x8);
}
inline static Vector3i GetSideCoordinate(const Vector3i & a_Position, NIBBLETYPE a_Meta, bool a_bInverse)
{
auto Position = a_Position;