Cuberite
A lightweight, fast and extensible game server for Minecraft
ForEachSourceCallback.h
Go to the documentation of this file.
1 
2 #pragma once
3 
5 
6 
7 
8 
9 
11 {
12 public:
13 
14  ForEachSourceCallback(const cChunk & Chunk, Vector3i Position, BLOCKTYPE CurrentBlock);
15 
17  void operator()(Vector3i Location);
18 
20  void CheckIndirectPower();
21 
22  // The maximum power level of all source locations.
24 
25 private:
26 
29  static PowerLevel QueryLinkedPower(const cChunk & Chunk, Vector3i QueryPosition, BLOCKTYPE QueryBlock, Vector3i SolidBlockPosition);
30 
31  const cChunk & m_Chunk;
34 };
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
unsigned char PowerLevel
Definition: Chunk.h:36
ForEachSourceCallback(const cChunk &Chunk, Vector3i Position, BLOCKTYPE CurrentBlock)
const BLOCKTYPE m_CurrentBlock
void operator()(Vector3i Location)
Callback invoked for each potential source position of the redstone component.
static PowerLevel QueryLinkedPower(const cChunk &Chunk, Vector3i QueryPosition, BLOCKTYPE QueryBlock, Vector3i SolidBlockPosition)
Asks redstone handlers adjacent to a solid block how much power they will deliver to the querying pos...
void CheckIndirectPower()
Callback invoked for blocks supporting quasiconnectivity.