7 #include "BlockState.h"
71 return std::exchange(Result->second,
Power);
86 std::unordered_map<Vector3i, BlockState, VectorHasher<int>>
WireStates;
UInt32 From(const BlockState Block)
unsigned char Power(const BlockState Block)
std::stack< Vector3i, std::vector< Vector3i > > m_ActiveBlocks
std::unordered_set< Vector3i, VectorHasher< int > > AlwaysTickedPositions
friend class cRedstoneHandlerFactory
std::pair< int, bool > * GetMechanismDelayInfo(const Vector3i Position)
std::unordered_map< Vector3i, std::pair< int, bool >, VectorHasher< int > > m_MechanismDelays
Structure storing position of mechanism + it's delay ticks (countdown) & if to power on.
static Vector3i RebaseRelativePosition(const cChunk &From, const cChunk &To, const Vector3i Position)
Adjust From-relative coordinates into To-relative coordinates.
PowerLevel ExchangeUpdateOncePowerData(const Vector3i &a_Position, PowerLevel Power)
std::unordered_map< Vector3i, PowerLevel, VectorHasher< int > > m_CachedPowerLevels
void WakeUp(const Vector3i &a_Position)
PowerLevel GetCachedPowerData(const Vector3i Position) const
std::unordered_map< Vector3i, std::pair< BLOCKTYPE, NIBBLETYPE >, VectorHasher< int > > ObserverCache
Structure storing an observer's last seen block.
std::unordered_map< Vector3i, BlockState, VectorHasher< int > > WireStates
Temporary, should be chunk data: wire block store, to avoid recomputing states every time.
void SetCachedPowerData(const Vector3i Position, const PowerLevel PowerLevel)
void ErasePowerData(const Vector3i Position)
Erase all cached redstone data for position.