8 #include "../OpaqueWorld.h" 10 #include "../Blocks/BroadcastInterface.h" 17 super(a_World, a_Fluid, a_StationaryFluid)
27 if (a_Chunk ==
nullptr)
32 auto blockType = a_Chunk->
GetBlock(relPos);
40 "block.fire.extinguish",
cVaporizeFluidSimulator(cWorld &a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid)
cBroadcastInterface * GetBroadcastInterface(cWorld *a_World)
unsigned char BLOCKTYPE
The datatype used by blockdata.
virtual void Simulate(float a_Dt) override
Called in each tick, a_Dt is the time passed since the last tick, in msec.
BLOCKTYPE m_StationaryFluidBlock
virtual void AddBlock(Vector3i a_Block, cChunk *a_Chunk) override
Called to simulate a new block.
void SetBlock(Vector3i a_RelBlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc...
virtual void BroadcastSoundEffect(const AString &a_SoundName, Vector3d a_Position, float a_Volume, float a_Pitch, const cClientHandle *a_Exclude=nullptr)=0
Vector3< double > Vector3d
static void AbsoluteToRelative(int &a_X, int &a_Y, int &a_Z, int &a_ChunkX, int &a_ChunkZ)
Converts absolute block coords into relative (chunk + block) coords:
BLOCKTYPE GetBlock(int a_RelX, int a_RelY, int a_RelZ) const