Cuberite
A lightweight, fast and extensible game server for Minecraft
NoopFluidSimulator.h
Go to the documentation of this file.
1 
2 // NoopFluidSimulator.h
3 
4 // Declares the cNoopFluidSimulator class representing a fluid simulator that performs nothing, it ignores all blocks
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "FluidSimulator.h"
13 
14 
15 
16 
17 
19  public cFluidSimulator
20 {
22 
23 public:
24  cNoopFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid) :
25  super(a_World, a_Fluid, a_StationaryFluid)
26  {
27  }
28 
29  // cSimulator overrides:
30  virtual void AddBlock(Vector3i a_Block, cChunk * a_Chunk) override
31  {
32  UNUSED(a_Block);
33  UNUSED(a_Chunk);
34  }
35  virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);}
36 } ;
37 
38 
39 
40 
virtual void Simulate(float a_Dt) override
Called in each tick, a_Dt is the time passed since the last tick, in msec.
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
Definition: Chunk.h:49
cFluidSimulator super
cNoopFluidSimulator(cWorld &a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid)
Definition: World.h:65
virtual void AddBlock(Vector3i a_Block, cChunk *a_Chunk) override
Called to simulate a new block.
#define UNUSED
Definition: Globals.h:152