public IChunk GenerateChunk(IChunk chunk, int x, int z, bool external) { InitGen(); #if PROFILE Stopwatch watch = new Stopwatch(); watch.Start(); #endif GenerateTerrain(chunk, x, z); GenerateFlora(chunk, x, z); if (!external) { chunk.RecalculateHeight(); chunk.LightToRecalculate = true; #if PROFILE watch.Stop(); _World.Logger.Log(Logger.LogLevel.Info, "Chunk {0} {1}, {2}", false, x, z, watch.ElapsedMilliseconds); #endif _World.AddChunk(chunk); chunk.MarkToSave(); } return(chunk); }
public IChunk GenerateChunk(IChunk chunk, int x, int z, bool external) { InitGen(); #if PROFILE Stopwatch watch = new Stopwatch(); watch.Start(); #endif GenerateTerrain(chunk, x, z); GenerateFlora(chunk, x, z); if (!external) { chunk.RecalculateHeight(); chunk.LightToRecalculate = true; #if PROFILE watch.Stop(); _World.Logger.Log(Logger.LogLevel.Info, "Chunk {0} {1}, {2}", false, x, z, watch.ElapsedMilliseconds); #endif _World.AddChunk(chunk); chunk.MarkToSave(); } return chunk; }