public boolean saveChunks(boolean var1, IProgressUpdate var2) {
      int var3 = 0;

      for(int var4 = 0; var4 < this.chunkList.size(); ++var4) {
         Chunk var5 = (Chunk)this.chunkList.get(var4);
         if(var1 && !var5.neverSave) {
            this.func_28063_a(var5);
         }

         if(var5.needsSaving(var1)) {
            this.func_28062_b(var5);
            var5.isModified = false;
            ++var3;
            if(var3 == 24 && !var1) {
               return false;
            }
         }
      }

      if(var1) {
         if(this.chunkLoader == null) {
            return true;
         }

         this.chunkLoader.saveExtraData();
      }

      return true;
   }