public override void Run() { NbtWorld world = GetWorld(opt); IChunkManager cm = world.GetChunkManager(opt.OPT_DIM); FilteredChunkManager fcm = new FilteredChunkManager(cm, opt.GetChunkFilter()); int affectedChunks = 0; foreach (ChunkRef chunk in fcm) { if (chunk == null || !chunk.IsTerrainPopulated) { continue; } if (opt.OPT_V) { Console.WriteLine("Processing Chunk (" + chunk.X + "," + chunk.Z + ")"); } affectedChunks++; ApplyChunk(world, chunk); fcm.Save(); } Console.WriteLine("Affected Chunks: " + affectedChunks); }