protected void actionPerformed(GuiButton par1GuiButton)
    {
        if (!par1GuiButton.enabled)
        {
            return;
        }

        if (par1GuiButton.id == 5)
        {
            if (Minecraft.getOs() == EnumOS.MACOS)
            {
                try
                {
                    System.out.println(fileLocation);
                    Runtime.getRuntime().exec(new String[]
                            {
                                "/usr/bin/open", fileLocation
                            });
                    return;
                }
                catch (IOException ioexception)
                {
                    ioexception.printStackTrace();
                }
            }
            else if (Minecraft.getOs() == EnumOS.WINDOWS)
            {
                String s = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[]
                        {
                            fileLocation
                        });

                try
                {
                    Runtime.getRuntime().exec(s);
                    return;
                }
                catch (IOException ioexception1)
                {
                    ioexception1.printStackTrace();
                }
            }

            boolean flag = false;

            try
            {
                Class class1 = Class.forName("java.awt.Desktop");
                Object obj = class1.getMethod("getDesktop", new Class[0]).invoke(null, new Object[0]);
                class1.getMethod("browse", new Class[]
                        {
                            java.net.URI.class
                        }).invoke(obj, new Object[]
                                {
                                    (new File(Minecraft.getMinecraftDir(), "texturepacks")).toURI()
                                });
            }
            catch (Throwable throwable)
            {
                throwable.printStackTrace();
                flag = true;
            }

            if (flag)
            {
                System.out.println("Opening via system class!");
                Sys.openURL((new StringBuilder()).append("file://").append(fileLocation).toString());
            }
        }
        else if (par1GuiButton.id == 6)
        {
            mc.renderEngine.refreshTextures();
            mc.displayGuiScreen(guiScreen);
        }
        else
        {
            guiTexturePackSlot.actionPerformed(par1GuiButton);
        }
    }