Cuberite
A lightweight, fast and extensible game server for Minecraft
Functions
RedstoneRepeaterHandler Namespace Reference

Functions

static bool DoesLhsLockMe (NIBBLETYPE a_MetaLhs, NIBBLETYPE a_MyMeta)
 Determine, from the metadata of a repeater on our left side, if they lock us. More...
 
static void ForValidSourcePositions (const cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, ForEachSourceCallback &Callback)
 
static PowerLevel GetPowerDeliveredToPosition (const cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType, bool IsLinked)
 
static bool IsLocked (cChunk &Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta)
 Determine if a repeater is locked. More...
 
static bool IsOn (BLOCKTYPE a_Block)
 
static std::pair< bool, NIBBLETYPEIsOnRepeater (cChunk &Chunk, const Vector3i a_Position)
 Returns a pair with first element indicating if the block at the given position is an activated repeater. More...
 
static void Update (cChunk &a_Chunk, cChunk &CurrentlyTicking, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, const PowerLevel Power)
 

Function Documentation

◆ DoesLhsLockMe()

static bool RedstoneRepeaterHandler::DoesLhsLockMe ( NIBBLETYPE  a_MetaLhs,
NIBBLETYPE  a_MyMeta 
)
static

Determine, from the metadata of a repeater on our left side, if they lock us.

To test a repeater on our right, simply invert the order of arguments provided. "Left" is relative to the direction the repeater output faces, naturally.

Definition at line 35 of file RedstoneRepeaterHandler.h.

◆ ForValidSourcePositions()

static void RedstoneRepeaterHandler::ForValidSourcePositions ( const cChunk a_Chunk,
Vector3i  a_Position,
BLOCKTYPE  a_BlockType,
NIBBLETYPE  a_Meta,
ForEachSourceCallback Callback 
)
static

Definition at line 151 of file RedstoneRepeaterHandler.h.

◆ GetPowerDeliveredToPosition()

static PowerLevel RedstoneRepeaterHandler::GetPowerDeliveredToPosition ( const cChunk a_Chunk,
Vector3i  a_Position,
BLOCKTYPE  a_BlockType,
Vector3i  a_QueryPosition,
BLOCKTYPE  a_QueryBlockType,
bool  IsLinked 
)
static

Definition at line 84 of file RedstoneRepeaterHandler.h.

◆ IsLocked()

static bool RedstoneRepeaterHandler::IsLocked ( cChunk Chunk,
const Vector3i  a_Position,
const NIBBLETYPE  a_Meta 
)
static

Determine if a repeater is locked.

A locked repeater is one with another powered repeater facing them, to their immediate left or right sides. "Left" is relative to the direction the repeater output faces, naturally.

Definition at line 67 of file RedstoneRepeaterHandler.h.

◆ IsOn()

static bool RedstoneRepeaterHandler::IsOn ( BLOCKTYPE  a_Block)
static

Definition at line 12 of file RedstoneRepeaterHandler.h.

◆ IsOnRepeater()

static std::pair<bool, NIBBLETYPE> RedstoneRepeaterHandler::IsOnRepeater ( cChunk Chunk,
const Vector3i  a_Position 
)
static

Returns a pair with first element indicating if the block at the given position is an activated repeater.

If it is activated, the second element is the repeater metadata.

Definition at line 19 of file RedstoneRepeaterHandler.h.

◆ Update()

static void RedstoneRepeaterHandler::Update ( cChunk a_Chunk,
cChunk CurrentlyTicking,
Vector3i  a_Position,
BLOCKTYPE  a_BlockType,
NIBBLETYPE  a_Meta,
const PowerLevel  Power 
)
static

Definition at line 101 of file RedstoneRepeaterHandler.h.