5 #include "../IniFile.h"
50 cWorld * a_World,
int a_BlockX,
int a_BlockY,
int a_BlockZ,
58 virtual void SimulateChunk(std::chrono::milliseconds a_Dt,
int a_ChunkX,
int a_ChunkZ,
cChunk * a_Chunk)
override;
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
std::list< cCoordWithInt > cCoordWithIntList
unsigned char BLOCKTYPE
The datatype used by blockdata.
cCoordWithIntList cSandSimulatorChunkData
Per-chunk data for the simulator, specified individual chunks to simulate; Data is not used.
Despite the class name, this simulator takes care of all blocks that fall when suspended in the air.
void DoInstantFall(cChunk *a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
Performs the instant fall of the block - removes it from top, Finishes it at the bottom.
virtual void AddBlock(cChunk &a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override
Called to simulate a new block.
static bool IsReplacedOnRematerialization(BLOCKTYPE a_BlockType)
Returns true if the falling block rematerializing will replace the specified block type (e.
static bool CanContinueFallThrough(BLOCKTYPE a_BlockType)
Returns true if an already-falling block can pass through the specified block type (e.
static void FinishFalling(cWorld *a_World, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_FallingBlockType, NIBBLETYPE a_FallingBlockMeta)
Called when a block finishes falling at the specified coords, either by insta-fall,...
static bool IsAllowedBlock(BLOCKTYPE a_BlockType)
static bool CanStartFallingThrough(BLOCKTYPE a_BlockType)
Returns true if a falling-able block can start falling through the specified block type.
cSandSimulator(cWorld &a_World, cIniFile &a_IniFile)
static bool DoesBreakFallingThrough(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Returns true if the specified block breaks falling blocks while they fall through it (e.
virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk *a_Chunk) override
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc....