30 virtual void Simulate(
float a_Dt) = 0;
33 virtual void SimulateChunk(std::chrono::milliseconds a_Dt,
int a_ChunkX,
int a_ChunkZ,
cChunk * a_Chunk)
unsigned char BLOCKTYPE
The datatype used by blockdata.
virtual void AddBlock(Vector3i a_Block, cChunk *a_Chunk)=0
Called to simulate a new block.
virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk *a_Chunk)
Called in each tick for each chunk, a_Dt is the time passed since the last tick, in msec; direct acce...
void WakeUpArea(const cCuboid &a_Area)
Does the same processing as WakeUp, but for all blocks within the specified area. ...
virtual void Simulate(float a_Dt)=0
Called in each tick, a_Dt is the time passed since the last tick, in msec.
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc...
virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType)=0
Returns true if the specified block type is "interesting" for this simulator.
void WakeUp(Vector3i a_Block, cChunk *a_Chunk)
Called when a block changes.
cSimulator(cWorld &a_World)