public static void DoCleanup(World world, ChunkManager.ChunkObserver co, string commandType, int ts = 0, ThreadManager.TaskInfo taskInfo = null) { var bcmTask = BCTask.GetTask(commandType, taskInfo?.GetHashCode()); for (var i = 0; i < ts; i++) { if (bcmTask != null) { bcmTask.Output = new { timer = i, total = ts } } ; Thread.Sleep(1000); } world.m_ChunkManager.RemoveChunkObserver(co); }