Cuberite
A lightweight, fast and extensible game server for Minecraft
RedstoneSimulator.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Simulator.h"
5 
6 
7 
8 
9 
11 {
12 public:
13  virtual ~cRedstoneSimulatorChunkData() = 0;
14 };
15 
17 
18 
19 
20 
21 
23  public cSimulator
24 {
25  typedef cSimulator super;
26 public:
27 
29  super(a_World)
30  {
31  }
32 
33  virtual void Simulate(float a_Dt) = 0;
34  virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) = 0;
35  virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) = 0;
36  virtual void AddBlock(Vector3i a_Block, cChunk * a_Chunk) = 0;
37 
38  virtual cRedstoneSimulatorChunkData * CreateChunkData() = 0;
39 
40 };
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
cRedstoneSimulator(cWorld &a_World)
Definition: Chunk.h:49
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc...
Definition: Simulator.h:19
Definition: World.h:65