54 virtual void SimulateChunk(std::chrono::milliseconds a_Dt,
int a_ChunkX,
int a_ChunkZ,
cChunk * a_Chunk) = 0;
unsigned char BLOCKTYPE
The datatype used by blockdata.
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc....
virtual void Simulate(float a_Dt)
virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk *a_Chunk)=0
virtual void WakeUp(cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block)
Called to simulate a single new block, typically as a result of a single block break or change.
static std::array< Vector3i, 5 > GetLinkedOffsets(Vector3i Offset)
For a given offset from a position, return the offsets that represent the adjacents of the newly offs...
static constexpr std::array< Vector3i, 6 > AdjacentOffsets
Contains offsets for direct adjacents of any position.
virtual void AddBlock(cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block)=0
Called to simulate a new block.
cSimulator(cWorld &a_World)