From 499745c1c7a865941b3c102532777c19dfb92ca4 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 18 Feb 2012 17:53:22 +0000 Subject: Thread-safe chunk generation, storage and generator are queried for progress while initializing server Note that this commit breaks foliage generation - there are no trees in the chunks generated! git-svn-id: http://mc-server.googlecode.com/svn/trunk@292 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorldGenerator.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/cWorldGenerator.h') diff --git a/source/cWorldGenerator.h b/source/cWorldGenerator.h index 208178d4a..92c2a1d0c 100644 --- a/source/cWorldGenerator.h +++ b/source/cWorldGenerator.h @@ -18,7 +18,7 @@ public: cWorldGenerator(cWorld * a_World); ~cWorldGenerator(); - virtual void GenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); + virtual void GenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities); protected: @@ -27,8 +27,11 @@ protected: // Thread-unsafe: MTRand r1; - virtual void GenerateTerrain( cChunkPtr a_Chunk ); - virtual void GenerateFoliage( cChunkPtr a_Chunk ); + static unsigned int MakeIndex(int x, int y, int z ); + + virtual void GenerateTerrain(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_BlockData); + + virtual void GenerateFoliage(cChunkPtr & a_Chunk ); }; -- cgit v1.2.3