protected final void onButtonClick(Button var1) {
      if(var1.id == 0) {
         this.minecraft.setCurrentScreen(new OptionsScreen(this, this.minecraft.settings));
      }

      if(var1.id == 1) {
         this.minecraft.setCurrentScreen(new GenerateLevelScreen(this));
      }

      if(this.minecraft.session != null) {
         if(var1.id == 2) {
            this.minecraft.setCurrentScreen(new SaveLevelScreen(this));
         }

         if(var1.id == 3) {
            this.minecraft.setCurrentScreen(new LoadLevelScreen(this));
         }
      }

      if(var1.id == 4) {
         this.minecraft.setCurrentScreen((GuiScreen)null);
         this.minecraft.grabMouse();
      }

   }