summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-21 21:39:58 +0200
committerGitHub <noreply@github.com>2020-09-21 21:39:58 +0200
commit6183b28f93f7315b7afb1f17ab46a684002e173f (patch)
tree6d1d0b858b05868c7153206cb60a6d7c6c98f960 /src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h
parentImplement Dropspenser Hook (#4903) (diff)
downloadcuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar.gz
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar.bz2
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar.lz
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar.xz
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.tar.zst
cuberite-6183b28f93f7315b7afb1f17ab46a684002e173f.zip
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h
index 6d49291cb..66b56aa5a 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.h
@@ -13,20 +13,24 @@ public:
ForEachSourceCallback(const cChunk & Chunk, Vector3i Position, BLOCKTYPE CurrentBlock);
- /** Returns whether a potential source position should be treated as linked. */
- bool ShouldQueryLinkedPosition(Vector3i Location, BLOCKTYPE Block);
-
/** Callback invoked for each potential source position of the redstone component. */
void operator()(Vector3i Location);
- /** Asks redstone handlers adjacent to a solid block how much power they will deliver to the querying position, via the solid block.
- Both QueryPosition and SolidBlockPosition are relative to Chunk. */
- static PowerLevel QueryLinkedPower(const cChunk & Chunk, Vector3i QueryPosition, BLOCKTYPE QueryBlock, Vector3i SolidBlockPosition);
+ /** Callback invoked for blocks supporting quasiconnectivity. */
+ void CheckIndirectPower();
+ // The maximum power level of all source locations.
PowerLevel Power;
private:
+ /** Returns whether a potential source position that's occupied by Block should be treated as linked. */
+ static bool ShouldQueryLinkedPosition(BLOCKTYPE Block);
+
+ /** Asks redstone handlers adjacent to a solid block how much power they will deliver to the querying position, via the solid block.
+ Both QueryPosition and SolidBlockPosition are relative to Chunk. */
+ static PowerLevel QueryLinkedPower(const cChunk & Chunk, Vector3i QueryPosition, BLOCKTYPE QueryBlock, Vector3i SolidBlockPosition);
+
const cChunk & m_Chunk;
const Vector3i m_Position;
const BLOCKTYPE m_CurrentBlock;