4 #include "../../BlockEntities/DropSpenserEntity.h"
44 const bool IsPoweredNow = (
Power > 0);
45 const bool WasPoweredPreviously =
IsActivated(a_Meta);
47 if (IsPoweredNow && !WasPoweredPreviously)
59 if (IsPoweredNow != WasPoweredPreviously)
@ E_META_DROPSPENSER_ACTIVATED
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
constexpr std::array< Vector3i, 6 > RelativeAdjacents
void InvokeForAdjustedRelatives(ForEachSourceCallback &Callback, const Vector3i Position, const ArrayType &Relative)
unsigned char Power(const BlockState Block)
static void Update(cChunk &a_Chunk, cChunk &, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, const PowerLevel Power)
static NIBBLETYPE SetActivationState(NIBBLETYPE a_Meta, bool IsOn)
static void ForValidSourcePositions(const cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, ForEachSourceCallback &Callback)
static bool IsActivated(NIBBLETYPE a_Meta)
static PowerLevel GetPowerDeliveredToPosition(const cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_BlockType, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType, bool IsLinked)
static bool IsOn(NIBBLETYPE a_Meta)
BLOCKTYPE GetBlockType() const
bool DoWithBlockEntityAt(Vector3i a_Position, cBlockEntityCallback a_Callback)
Calls the callback for the block entity at the specified coords; returns false if there's no block en...
void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta)
void CheckIndirectPower()
Callback invoked for blocks supporting quasiconnectivity.