summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-10 22:22:54 +0100
committermadmaxoft <github@xoft.cz>2014-01-10 22:22:54 +0100
commitcea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8 (patch)
treeb6795602eb6f64625b2734c6e3a302a5374e145d /src/World.h
parentFixed generator adding values to ini file. (diff)
downloadcuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar.gz
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar.bz2
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar.lz
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar.xz
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.tar.zst
cuberite-cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8.zip
Diffstat (limited to '')
-rw-r--r--src/World.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/World.h b/src/World.h
index f90ddd90f..b61708d03 100644
--- a/src/World.h
+++ b/src/World.h
@@ -636,6 +636,27 @@ private:
virtual void Execute(void) override;
} ;
+
+ /** Implementation of the callbacks that the ChunkGenerator uses to store new chunks and interface to plugins */
+ class cChunkGeneratorCallbacks :
+ public cChunkGenerator::cChunkSink,
+ public cChunkGenerator::cPluginInterface
+ {
+ cWorld * m_World;
+
+ // cChunkSink overrides:
+ virtual void OnChunkGenerated (cChunkDesc & a_ChunkDesc) override;
+ virtual bool IsChunkValid (int a_ChunkX, int a_ChunkZ) override;
+ virtual bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) override;
+
+ // cPluginInterface overrides:
+ virtual void CallHookChunkGenerating(cChunkDesc & a_ChunkDesc) override;
+ virtual void CallHookChunkGenerated (cChunkDesc & a_ChunkDesc) override;
+
+ public:
+ cChunkGeneratorCallbacks(cWorld & a_World);
+ } ;
+
AString m_WorldName;
AString m_IniFileName;
@@ -714,6 +735,9 @@ private:
cChunkGenerator m_Generator;
+ /** The callbacks that the ChunkGenerator uses to store new chunks and interface to plugins */
+ cChunkGeneratorCallbacks m_GeneratorCallbacks;
+
cChunkSender m_ChunkSender;
cLightingThread m_Lighting;
cTickThread m_TickThread;