summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
index d953be8c0..76cc5893a 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
@@ -1,21 +1,20 @@
#pragma once
-#include "RedstoneHandler.h"
#include "../../BlockEntities/DropSpenserEntity.h"
-class cDropSpenserHandler final : public cRedstoneHandler
+namespace DropSpenserHandler
{
- inline static bool IsActivated(NIBBLETYPE a_Meta)
+ inline bool IsActivated(NIBBLETYPE a_Meta)
{
return (a_Meta & E_META_DROPSPENSER_ACTIVATED) != 0;
}
- inline static NIBBLETYPE SetActivationState(NIBBLETYPE a_Meta, bool IsOn)
+ inline NIBBLETYPE SetActivationState(NIBBLETYPE a_Meta, bool IsOn)
{
if (IsOn)
{
@@ -27,7 +26,7 @@ class cDropSpenserHandler final : public cRedstoneHandler
}
}
- virtual unsigned char GetPowerDeliveredToPosition(const cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType, bool IsLinked) const override
+ inline unsigned char GetPowerDeliveredToPosition(const cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType, bool IsLinked)
{
UNUSED(a_Chunk);
UNUSED(a_Position);
@@ -38,7 +37,7 @@ class cDropSpenserHandler final : public cRedstoneHandler
return 0;
}
- virtual void Update(cChunk & a_Chunk, cChunk &, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, PoweringData a_PoweringData) const override
+ inline void Update(cChunk & a_Chunk, cChunk &, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, PoweringData a_PoweringData)
{
// LOGD("Evaluating spencer the dropspenser (%d %d %d)", a_Position.x, a_Position.y, a_Position.z);
@@ -61,7 +60,7 @@ class cDropSpenserHandler final : public cRedstoneHandler
}
}
- virtual void ForValidSourcePositions(const cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, SourceCallback Callback) const override
+ inline void ForValidSourcePositions(const cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, ForEachSourceCallback & Callback)
{
UNUSED(a_Chunk);
UNUSED(a_BlockType);