public List func_22176_b() {
    ArrayList arraylist = new ArrayList();
    File afile[] = field_22180_a.listFiles();
    File afile1[] = afile;
    int i = afile1.length;
    for (int j = 0; j < i; j++) {
      File file = afile1[j];
      if (!file.isDirectory()) {
        continue;
      }
      String s = file.getName();
      WorldInfo worldinfo = func_22173_b(s);
      if (worldinfo == null) {
        continue;
      }
      boolean flag = worldinfo.getSaveVersion() != 19132;
      String s1 = worldinfo.getWorldName();
      if (s1 == null || MathHelper.stringNullOrLengthZero(s1)) {
        s1 = s;
      }
      arraylist.add(
          new SaveFormatComparator(
              s, s1, worldinfo.getLastTimePlayed(), worldinfo.getSizeOnDisk(), flag));
    }

    return arraylist;
  }
  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (par1GuiButton.id == 0) {
      this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (par1GuiButton.id == 5) {
      this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
    }

    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (par1GuiButton.id == 4) {
      this.mc.shutdown();
    }

    if (par1GuiButton.id == 11) {
      this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (par1GuiButton.id == 12) {
      ISaveFormat var2 = this.mc.getSaveLoader();
      WorldInfo var3 = var2.getWorldInfo("Demo_World");

      if (var3 != null) {
        GuiYesNo var4 = GuiSelectWorld.func_74061_a(this, var3.getWorldName(), 12);
        this.mc.displayGuiScreen(var4);
      }
    }
  }
  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (par1GuiButton.id == 0) {
      mc.displayGuiScreen(new GuiOptions(this, mc.gameSettings));
    }

    if (par1GuiButton.id == 5) {
      mc.displayGuiScreen(new GuiLanguage(this, mc.gameSettings, mc.func_135016_M()));
    }

    if (par1GuiButton.id == 1) {
      mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (par1GuiButton.id == 2) {
      mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (par1GuiButton.id == 14 && field_130023_H.drawButton) {
      func_140005_i();
    }

    if (par1GuiButton.id == 4) {
      mc.shutdown();
    }

    if (par1GuiButton.id == 10) {
      mc.displayGuiScreen(new GuiScreenTemporaryResourcePackSelect(this, mc.gameSettings));
    }

    if (par1GuiButton.id == 11) {
      mc.enableSP = mc.useSP;
      if (mc.enableSP) {
        mc.playerController = new PlayerControllerDemo(mc);
        mc.startWorldSSP("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
        mc.displayGuiScreen(null);
      } else {
        mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
      }
    }

    if (par1GuiButton.id == 12) {
      ISaveFormat isaveformat = mc.getSaveLoader();
      WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

      if (worldinfo != null) {
        GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
        mc.displayGuiScreen(guiyesno);
      }
    }
  }
  public List getSaveList() {
    ArrayList arraylist = new ArrayList();
    File afile[] = savesDirectory.listFiles();
    File afile1[] = afile;
    int i = afile1.length;

    for (int j = 0; j < i; j++) {
      File file = afile1[j];

      if (!file.isDirectory()) {
        continue;
      }

      String s = file.getName();
      WorldInfo worldinfo = getWorldInfo(s);

      if (worldinfo == null
          || worldinfo.getSaveVersion() != 19132 && worldinfo.getSaveVersion() != 19133) {
        continue;
      }

      boolean flag = worldinfo.getSaveVersion() != getSaveVersion();
      String s1 = worldinfo.getWorldName();

      if (s1 == null || MathHelper.stringNullOrLengthZero(s1)) {
        s1 = s;
      }

      long l = 0L;
      arraylist.add(
          new SaveFormatComparator(
              s,
              s1,
              worldinfo.getLastTimePlayed(),
              l,
              worldinfo.getGameType(),
              flag,
              worldinfo.isHardcoreModeEnabled(),
              worldinfo.areCommandsAllowed()));
    }

    return arraylist;
  }