public override void ReplaceBlocksIn(long X, long Z, Dictionary<byte, byte> Replacements)
{
if (Replacements == null) return;
Chunk c = GetChunk((int)X, (int)Z);
if (c == null) return;
bool bu=false;
for(int x = 0;x<ChunkX;x++)
{
for (int y = 0; y < ChunkZ; y++)
{
for (int z = 0; z < ChunkY; z++)
{
if (Replacements.ContainsKey(c.Blocks[x,y,z]))
{
c.Blocks[x,y,z] = Replacements[c.Blocks[x,y,z]];
bu = true;
}
}
}
}
if(!bu) return;
Vector2i ci = GetChunkHandle((int)X, (int)Z);
if (mChunks.ContainsKey(ci))
{
mChunks.Remove(ci);
}
mChunks.Add(ci,c);
//if(!ChangedChunks.Contains(ci))
// ChangedChunks.Add(ci);
c.Save();
}