summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockComparator.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockComparator.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/Blocks/BlockComparator.h b/src/Blocks/BlockComparator.h
index a2f2d430d..ba939b41f 100644
--- a/src/Blocks/BlockComparator.h
+++ b/src/Blocks/BlockComparator.h
@@ -34,10 +34,13 @@ public:
const Vector3i a_CursorPos
) override
{
+ const auto Meta = a_ChunkInterface.GetBlockMeta(a_BlockPos);
+
// Toggle the 3rd bit (addition / subtraction):
- NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockPos);
- Meta ^= 0x04;
- a_ChunkInterface.SetBlockMeta(a_BlockPos, Meta);
+ a_ChunkInterface.SetBlockMeta(a_BlockPos, Meta ^ 0x04);
+
+ // Update simulators:
+ a_WorldInterface.WakeUpSimulators(a_BlockPos);
return true;
}
@@ -56,6 +59,7 @@ public:
UNUSED(a_ChunkInterface);
UNUSED(a_BlockFace);
+ a_WorldInterface.WakeUpSimulators(a_BlockPos);
a_WorldInterface.SendBlockTo(a_BlockPos, a_Player);
}
@@ -120,15 +124,6 @@ public:
- inline static bool IsOn(NIBBLETYPE a_Meta)
- {
- return ((a_Meta & 0x8) == 0x8);
- }
-
-
-
-
-
inline static Vector3i GetSideCoordinate(Vector3i a_Position, NIBBLETYPE a_Meta, bool a_bInverse)
{
if (!a_bInverse)