Cuberite
A lightweight, fast and extensible game server for Minecraft
ForEachChunkProvider.h
Go to the documentation of this file.
1 
2 // ForEachChunkProvider.h
3 
4 // Declares the cForEachChunkProvider class which acts as an interface for classes that provide a ForEachChunkInRect() function
5 // Primarily serves as a decoupling between cBlockArea and cWorld
6 
7 
8 
9 
10 
11 #pragma once
12 
13 
14 
15 
16 // fwd:
17 class cChunkDataCallback;
18 class cBlockArea;
19 
20 
21 
22 
23 
25 {
26 public:
28 
30  virtual bool ForEachChunkInRect(int a_MinChunkX, int a_MaxChunkX, int a_MinChunkZ, int a_MaxChunkZ, cChunkDataCallback & a_Callback) = 0;
31 
36  virtual bool WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes) = 0;
37 };
38 
39 
40 
41 
virtual bool WriteBlockArea(cBlockArea &a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes)=0
Writes the block area into the specified coords.
virtual bool ForEachChunkInRect(int a_MinChunkX, int a_MaxChunkX, int a_MinChunkZ, int a_MaxChunkZ, cChunkDataCallback &a_Callback)=0
Calls the callback for each chunk in the specified range.