2015-06-26 17:24:51 -05:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RedstoneHandler.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-26 14:15:00 +01:00
|
|
|
class cRedstoneBlockHandler final : public cRedstoneHandler
|
2015-06-26 17:24:51 -05:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
2020-07-26 14:15:00 +01:00
|
|
|
virtual unsigned char GetPowerDeliveredToPosition(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
|
2015-06-26 17:24:51 -05:00
|
|
|
{
|
2020-07-26 14:15:00 +01:00
|
|
|
UNUSED(a_Chunk);
|
2015-06-26 17:24:51 -05:00
|
|
|
UNUSED(a_Position);
|
|
|
|
|
UNUSED(a_BlockType);
|
|
|
|
|
UNUSED(a_Meta);
|
|
|
|
|
UNUSED(a_QueryPosition);
|
2016-05-28 22:48:36 +02:00
|
|
|
return cIncrementalRedstoneSimulator::IsMechanism(a_QueryBlockType) ? 15 : 0;
|
2015-06-26 17:24:51 -05:00
|
|
|
}
|
|
|
|
|
|
2020-07-26 14:15:00 +01:00
|
|
|
virtual void Update(cChunk & a_Chunk, cChunk & CurrentlyTicking, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, PoweringData a_PoweringData) const override
|
2015-06-26 17:24:51 -05:00
|
|
|
{
|
2015-12-24 17:57:45 +02:00
|
|
|
// LOGD("Evaluating crimson the redstone block (%d %d %d)", a_Position.x, a_Position.y, a_Position.z);
|
2015-06-26 17:24:51 -05:00
|
|
|
}
|
|
|
|
|
|
2020-07-26 14:15:00 +01:00
|
|
|
virtual void ForValidSourcePositions(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, SourceCallback Callback) const override
|
2015-06-26 17:24:51 -05:00
|
|
|
{
|
2020-07-26 14:15:00 +01:00
|
|
|
UNUSED(a_Chunk);
|
2015-06-26 17:24:51 -05:00
|
|
|
UNUSED(a_Position);
|
|
|
|
|
UNUSED(a_BlockType);
|
|
|
|
|
UNUSED(a_Meta);
|
2020-07-26 14:15:00 +01:00
|
|
|
UNUSED(Callback);
|
2015-06-26 17:24:51 -05:00
|
|
|
}
|
|
|
|
|
};
|