/// <inheritdoc/> public ChunkRef CreateChunk(int cx, int cz) { DeleteChunk(cx, cz); AlphaChunk c = AlphaChunk.Create(cx, cz); c.Save(GetChunkOutStream(cx, cz)); ChunkRef cr = ChunkRef.Create(this, cx, cz); ChunkKey k = new ChunkKey(cx, cz); _cache[k] = cr; return(cr); }
/// <inheritdoc/> public ChunkRef CreateChunk(int cx, int cz) { DeleteChunk(cx, cz); AlphaChunk chunk = AlphaChunk.Create(cx, cz); using (Stream chunkOutStream = GetChunkOutStream(cx, cz)) { chunk.Save(chunkOutStream); } ChunkRef cr = ChunkRef.Create(this, cx, cz); ChunkKey k = new ChunkKey(cx, cz); _cache[k] = cr; return(cr); }