Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Public Attributes | Static Private Member Functions | Private Attributes | List of all members
ForEachSourceCallback Class Reference

#include <ForEachSourceCallback.h>

Collaboration diagram for ForEachSourceCallback:
Collaboration graph
[legend]

Public Member Functions

void CheckIndirectPower ()
 Callback invoked for blocks supporting quasiconnectivity. More...
 
 ForEachSourceCallback (const cChunk &Chunk, Vector3i Position, BLOCKTYPE CurrentBlock)
 
void operator() (Vector3i Location)
 Callback invoked for each potential source position of the redstone component. More...
 

Public Attributes

PowerLevel Power
 

Static Private Member Functions

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 position, via the solid block. More...
 

Private Attributes

const cChunkm_Chunk
 
const BLOCKTYPE m_CurrentBlock
 
const Vector3i m_Position
 

Detailed Description

Definition at line 10 of file ForEachSourceCallback.h.

Constructor & Destructor Documentation

◆ ForEachSourceCallback()

ForEachSourceCallback::ForEachSourceCallback ( const cChunk Chunk,
Vector3i  Position,
BLOCKTYPE  CurrentBlock 
)

Definition at line 15 of file ForEachSourceCallback.cpp.

Member Function Documentation

◆ CheckIndirectPower()

void ForEachSourceCallback::CheckIndirectPower ( )

Callback invoked for blocks supporting quasiconnectivity.

Definition at line 63 of file ForEachSourceCallback.cpp.

◆ operator()()

void ForEachSourceCallback::operator() ( Vector3i  Location)

Callback invoked for each potential source position of the redstone component.

Definition at line 27 of file ForEachSourceCallback.cpp.

◆ QueryLinkedPower()

PowerLevel ForEachSourceCallback::QueryLinkedPower ( const cChunk Chunk,
Vector3i  QueryPosition,
BLOCKTYPE  QueryBlock,
Vector3i  SolidBlockPosition 
)
staticprivate

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.

Definition at line 91 of file ForEachSourceCallback.cpp.

Member Data Documentation

◆ m_Chunk

const cChunk& ForEachSourceCallback::m_Chunk
private

Definition at line 31 of file ForEachSourceCallback.h.

◆ m_CurrentBlock

const BLOCKTYPE ForEachSourceCallback::m_CurrentBlock
private

Definition at line 33 of file ForEachSourceCallback.h.

◆ m_Position

const Vector3i ForEachSourceCallback::m_Position
private

Definition at line 32 of file ForEachSourceCallback.h.

◆ Power

PowerLevel ForEachSourceCallback::Power

Definition at line 23 of file ForEachSourceCallback.h.


The documentation for this class was generated from the following files: