/** Adds Demo buttons on Main Menu for players who are playing Demo. */
  private void addDemoButtons(int par1, int par2) {
    this.buttonList.add(
        new GuiButton(11, this.width / 2 - 100, par1, I18n.format("menu.playdemo", new Object[0])));
    this.buttonList.add(
        this.buttonResetDemo =
            new GuiButton(
                12,
                this.width / 2 - 100,
                par1 + par2 * 1,
                I18n.format("menu.resetdemo", new Object[0])));
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

    if (worldinfo == null) {
      this.buttonResetDemo.enabled = false;
    }
  }
  /** Adds Demo buttons on Main Menu for players who are playing Demo. */
  private void addDemoButtons(int p_73972_1_, int p_73972_2_) {
    this.buttonList.add(
        new GuiButton(
            11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
    this.buttonList.add(
        this.buttonResetDemo =
            new GuiButton(
                12,
                this.width / 2 - 100,
                p_73972_1_ + p_73972_2_ * 1,
                I18n.format("menu.resetdemo", new Object[0])));
    ISaveFormat var3 = this.mc.getSaveLoader();
    WorldInfo var4 = var3.getWorldInfo("Demo_World");

    if (var4 == null) {
      this.buttonResetDemo.enabled = false;
    }
  }
  protected void actionPerformed(GuiButton p_146284_1_) {
    if (p_146284_1_.id == 0) {
      this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

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

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

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

    if (p_146284_1_.id == 14 && this.minecraftRealmsButton.visible) {
      this.func_140005_i();
    }

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

    if (p_146284_1_.id == 6) {
      this.mc.displayGuiScreen(new GuiModList(this));
    }

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

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

      if (worldinfo != null) {
        GuiYesNo guiyesno = GuiSelectWorld.func_146623_a(this, worldinfo.getWorldName(), 12);
        this.mc.displayGuiScreen(guiyesno);
      }
    }
  }
  protected void actionPerformed(GuiButton p_146284_1_) {
    if (p_146284_1_.id == 0) {
      this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

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

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

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

    if (p_146284_1_.id == 14) {
      this.func_140005_i();
    }

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

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

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

      if (var3 != null) {
        GuiYesNo var4 = GuiSelectWorld.func_152129_a(this, var3.getWorldName(), 12);
        this.mc.displayGuiScreen(var4);
      }
    }
  }