001package net.minecraft.client.gui;
002
003import cpw.mods.fml.client.GuiModList;
004import cpw.mods.fml.common.FMLCommonHandler;
005import cpw.mods.fml.relauncher.Side;
006import cpw.mods.fml.relauncher.SideOnly;
007import java.awt.image.BufferedImage;
008import java.io.BufferedReader;
009import java.io.IOException;
010import java.io.InputStreamReader;
011import java.net.URI;
012import java.nio.charset.Charset;
013import java.util.ArrayList;
014import java.util.Calendar;
015import java.util.Date;
016import java.util.List;
017import java.util.Random;
018import net.minecraft.client.Minecraft;
019import net.minecraft.client.renderer.Tessellator;
020import net.minecraft.util.EnumChatFormatting;
021import net.minecraft.util.MathHelper;
022import net.minecraft.util.StringTranslate;
023import net.minecraft.world.demo.DemoWorldServer;
024import net.minecraft.world.storage.ISaveFormat;
025import net.minecraft.world.storage.WorldInfo;
026import org.lwjgl.opengl.GL11;
027import org.lwjgl.util.glu.GLU;
028
029import com.google.common.base.Strings;
030import com.google.common.collect.Lists;
031
032@SideOnly(Side.CLIENT)
033public class GuiMainMenu extends GuiScreen
034{
035    /** The RNG used by the Main Menu Screen. */
036    private static final Random rand = new Random();
037
038    /** Counts the number of screen updates. */
039    private float updateCounter = 0.0F;
040
041    /** The splash message. */
042    private String splashText = "missingno";
043    private GuiButton buttonResetDemo;
044
045    /** Timer used to rotate the panorama, increases every tick. */
046    private int panoramaTimer = 0;
047
048    /**
049     * Texture allocated for the current viewport of the main menu's panorama background.
050     */
051    private int viewportTexture;
052    private boolean field_96141_q = true;
053    private static boolean field_96140_r = false;
054    private static boolean field_96139_s = false;
055    private String field_92025_p;
056
057    /** An array of all the paths to the panorama pictures. */
058    private static final String[] titlePanoramaPaths = new String[] {"/title/bg/panorama0.png", "/title/bg/panorama1.png", "/title/bg/panorama2.png", "/title/bg/panorama3.png", "/title/bg/panorama4.png", "/title/bg/panorama5.png"};
059    public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
060    private int field_92024_r;
061    private int field_92023_s;
062    private int field_92022_t;
063    private int field_92021_u;
064    private int field_92020_v;
065    private int field_92019_w;
066
067    public GuiMainMenu()
068    {
069        BufferedReader bufferedreader = null;
070
071        try
072        {
073            ArrayList arraylist = new ArrayList();
074            bufferedreader = new BufferedReader(new InputStreamReader(GuiMainMenu.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
075            String s;
076
077            while ((s = bufferedreader.readLine()) != null)
078            {
079                s = s.trim();
080
081                if (s.length() > 0)
082                {
083                    arraylist.add(s);
084                }
085            }
086
087            do
088            {
089                this.splashText = (String)arraylist.get(rand.nextInt(arraylist.size()));
090            }
091            while (this.splashText.hashCode() == 125780783);
092        }
093        catch (IOException ioexception)
094        {
095            ;
096        }
097        finally
098        {
099            if (bufferedreader != null)
100            {
101                try
102                {
103                    bufferedreader.close();
104                }
105                catch (IOException ioexception1)
106                {
107                    ;
108                }
109            }
110        }
111
112        this.updateCounter = rand.nextFloat();
113    }
114
115    /**
116     * Called from the main game loop to update the screen.
117     */
118    public void updateScreen()
119    {
120        ++this.panoramaTimer;
121    }
122
123    /**
124     * Returns true if this GUI should pause the game when it is displayed in single-player
125     */
126    public boolean doesGuiPauseGame()
127    {
128        return false;
129    }
130
131    /**
132     * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
133     */
134    protected void keyTyped(char par1, int par2) {}
135
136    /**
137     * Adds the buttons (and other controls) to the screen in question.
138     */
139    public void initGui()
140    {
141        this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
142        Calendar calendar = Calendar.getInstance();
143        calendar.setTime(new Date());
144
145        if (calendar.get(2) + 1 == 11 && calendar.get(5) == 9)
146        {
147            this.splashText = "Happy birthday, ez!";
148        }
149        else if (calendar.get(2) + 1 == 6 && calendar.get(5) == 1)
150        {
151            this.splashText = "Happy birthday, Notch!";
152        }
153        else if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
154        {
155            this.splashText = "Merry X-mas!";
156        }
157        else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
158        {
159            this.splashText = "Happy new year!";
160        }
161        else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)
162        {
163            this.splashText = "OOoooOOOoooo! Spooky!";
164        }
165
166        StringTranslate stringtranslate = StringTranslate.getInstance();
167        int i = this.height / 4 + 48;
168
169        if (this.mc.isDemo())
170        {
171            this.addDemoButtons(i, 24, stringtranslate);
172        }
173        else
174        {
175            this.addSingleplayerMultiplayerButtons(i, 24, stringtranslate);
176        }
177
178        this.func_96137_a(stringtranslate, i, 24);
179
180        this.buttonList.add(new GuiButton(6, this.width / 2 - 100, i + 49, "Mods"));
181
182        if (this.mc.hideQuitButton)
183        {
184            this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72, stringtranslate.translateKey("menu.options")));
185        }
186        else
187        {
188            this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.options")));
189            this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.quit")));
190        }
191
192        this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, i + 72 + 12));
193        this.field_92025_p = "";
194        String s = System.getProperty("os_architecture");
195        String s1 = System.getProperty("java_version");
196
197        if ("ppc".equalsIgnoreCase(s))
198        {
199            this.field_92025_p = "" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " PowerPC compatibility will be dropped in Minecraft 1.6";
200        }
201        else if (s1 != null && s1.startsWith("1.5"))
202        {
203            this.field_92025_p = "" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " Java 1.5 compatibility will be dropped in Minecraft 1.6";
204        }
205
206        this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
207        this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
208        int j = Math.max(this.field_92023_s, this.field_92024_r);
209        this.field_92022_t = (this.width - j) / 2;
210        this.field_92021_u = ((GuiButton)this.buttonList.get(0)).yPosition - 24;
211        this.field_92020_v = this.field_92022_t + j;
212        this.field_92019_w = this.field_92021_u + 24;
213    }
214
215    private void func_96137_a(StringTranslate par1StringTranslate, int par2, int par3)
216    {
217        if (this.field_96141_q)
218        {
219            if (!field_96140_r)
220            {
221                field_96140_r = true;
222                (new ThreadTitleScreen(this, par1StringTranslate, par2, par3)).start();
223            }
224            else if (field_96139_s)
225            {
226                this.func_98060_b(par1StringTranslate, par2, par3);
227            }
228        }
229    }
230
231    private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3)
232    {
233        this.buttonList.add(new GuiButton(3, this.width / 2 - 100, par2 + par3 * 2, par1StringTranslate.translateKey("menu.online")));
234    }
235
236    /**
237     * Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.
238     */
239    private void addSingleplayerMultiplayerButtons(int par1, int par2, StringTranslate par3StringTranslate)
240    {
241        this.buttonList.add(new GuiButton(1, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.singleplayer")));
242        this.buttonList.add(new GuiButton(2, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.multiplayer")));
243    }
244
245    /**
246     * Adds Demo buttons on Main Menu for players who are playing Demo.
247     */
248    private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate)
249    {
250        this.buttonList.add(new GuiButton(11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo")));
251        this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo")));
252        ISaveFormat isaveformat = this.mc.getSaveLoader();
253        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
254
255        if (worldinfo == null)
256        {
257            this.buttonResetDemo.enabled = false;
258        }
259    }
260
261    /**
262     * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
263     */
264    protected void actionPerformed(GuiButton par1GuiButton)
265    {
266        if (par1GuiButton.id == 0)
267        {
268            this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
269        }
270
271        if (par1GuiButton.id == 5)
272        {
273            this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
274        }
275
276        if (par1GuiButton.id == 1)
277        {
278            this.mc.displayGuiScreen(new GuiSelectWorld(this));
279        }
280
281        if (par1GuiButton.id == 2)
282        {
283            this.mc.displayGuiScreen(new GuiMultiplayer(this));
284        }
285
286        if (par1GuiButton.id == 3)
287        {
288            this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
289        }
290
291        if (par1GuiButton.id == 4)
292        {
293            this.mc.shutdown();
294        }
295
296        if (par1GuiButton.id == 6)
297        {
298            this.mc.displayGuiScreen(new GuiModList(this));
299        }
300
301        if (par1GuiButton.id == 11)
302        {
303            this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
304        }
305
306        if (par1GuiButton.id == 12)
307        {
308            ISaveFormat isaveformat = this.mc.getSaveLoader();
309            WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
310
311            if (worldinfo != null)
312            {
313                GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
314                this.mc.displayGuiScreen(guiyesno);
315            }
316        }
317    }
318
319    public void confirmClicked(boolean par1, int par2)
320    {
321        if (par1 && par2 == 12)
322        {
323            ISaveFormat isaveformat = this.mc.getSaveLoader();
324            isaveformat.flushCache();
325            isaveformat.deleteWorldDirectory("Demo_World");
326            this.mc.displayGuiScreen(this);
327        }
328        else if (par2 == 13)
329        {
330            if (par1)
331            {
332                try
333                {
334                    Class oclass = Class.forName("java.awt.Desktop");
335                    Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
336                    oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI("http://tinyurl.com/javappc")});
337                }
338                catch (Throwable throwable)
339                {
340                    throwable.printStackTrace();
341                }
342            }
343
344            this.mc.displayGuiScreen(this);
345        }
346    }
347
348    /**
349     * Draws the main menu panorama
350     */
351    private void drawPanorama(int par1, int par2, float par3)
352    {
353        Tessellator tessellator = Tessellator.instance;
354        GL11.glMatrixMode(GL11.GL_PROJECTION);
355        GL11.glPushMatrix();
356        GL11.glLoadIdentity();
357        GLU.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
358        GL11.glMatrixMode(GL11.GL_MODELVIEW);
359        GL11.glPushMatrix();
360        GL11.glLoadIdentity();
361        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
362        GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
363        GL11.glEnable(GL11.GL_BLEND);
364        GL11.glDisable(GL11.GL_ALPHA_TEST);
365        GL11.glDisable(GL11.GL_CULL_FACE);
366        GL11.glDepthMask(false);
367        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
368        byte b0 = 8;
369
370        for (int k = 0; k < b0 * b0; ++k)
371        {
372            GL11.glPushMatrix();
373            float f1 = ((float)(k % b0) / (float)b0 - 0.5F) / 64.0F;
374            float f2 = ((float)(k / b0) / (float)b0 - 0.5F) / 64.0F;
375            float f3 = 0.0F;
376            GL11.glTranslatef(f1, f2, f3);
377            GL11.glRotatef(MathHelper.sin(((float)this.panoramaTimer + par3) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
378            GL11.glRotatef(-((float)this.panoramaTimer + par3) * 0.1F, 0.0F, 1.0F, 0.0F);
379
380            for (int l = 0; l < 6; ++l)
381            {
382                GL11.glPushMatrix();
383
384                if (l == 1)
385                {
386                    GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
387                }
388
389                if (l == 2)
390                {
391                    GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
392                }
393
394                if (l == 3)
395                {
396                    GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
397                }
398
399                if (l == 4)
400                {
401                    GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
402                }
403
404                if (l == 5)
405                {
406                    GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
407                }
408
409                this.mc.renderEngine.func_98187_b(titlePanoramaPaths[l]);
410                tessellator.startDrawingQuads();
411                tessellator.setColorRGBA_I(16777215, 255 / (k + 1));
412                float f4 = 0.0F;
413                tessellator.addVertexWithUV(-1.0D, -1.0D, 1.0D, (double)(0.0F + f4), (double)(0.0F + f4));
414                tessellator.addVertexWithUV(1.0D, -1.0D, 1.0D, (double)(1.0F - f4), (double)(0.0F + f4));
415                tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, (double)(1.0F - f4), (double)(1.0F - f4));
416                tessellator.addVertexWithUV(-1.0D, 1.0D, 1.0D, (double)(0.0F + f4), (double)(1.0F - f4));
417                tessellator.draw();
418                GL11.glPopMatrix();
419            }
420
421            GL11.glPopMatrix();
422            GL11.glColorMask(true, true, true, false);
423        }
424
425        tessellator.setTranslation(0.0D, 0.0D, 0.0D);
426        GL11.glColorMask(true, true, true, true);
427        GL11.glMatrixMode(GL11.GL_PROJECTION);
428        GL11.glPopMatrix();
429        GL11.glMatrixMode(GL11.GL_MODELVIEW);
430        GL11.glPopMatrix();
431        GL11.glDepthMask(true);
432        GL11.glEnable(GL11.GL_CULL_FACE);
433        GL11.glEnable(GL11.GL_ALPHA_TEST);
434        GL11.glEnable(GL11.GL_DEPTH_TEST);
435    }
436
437    /**
438     * Rotate and blurs the skybox view in the main menu
439     */
440    private void rotateAndBlurSkybox(float par1)
441    {
442        GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.viewportTexture);
443        this.mc.renderEngine.func_98185_a();
444        GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
445        GL11.glEnable(GL11.GL_BLEND);
446        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
447        GL11.glColorMask(true, true, true, false);
448        Tessellator tessellator = Tessellator.instance;
449        tessellator.startDrawingQuads();
450        byte b0 = 3;
451
452        for (int i = 0; i < b0; ++i)
453        {
454            tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (float)(i + 1));
455            int j = this.width;
456            int k = this.height;
457            float f1 = (float)(i - b0 / 2) / 256.0F;
458            tessellator.addVertexWithUV((double)j, (double)k, (double)this.zLevel, (double)(0.0F + f1), 0.0D);
459            tessellator.addVertexWithUV((double)j, 0.0D, (double)this.zLevel, (double)(1.0F + f1), 0.0D);
460            tessellator.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(1.0F + f1), 1.0D);
461            tessellator.addVertexWithUV(0.0D, (double)k, (double)this.zLevel, (double)(0.0F + f1), 1.0D);
462        }
463
464        tessellator.draw();
465        GL11.glColorMask(true, true, true, true);
466        this.mc.renderEngine.func_98185_a();
467    }
468
469    /**
470     * Renders the skybox in the main menu
471     */
472    private void renderSkybox(int par1, int par2, float par3)
473    {
474        GL11.glViewport(0, 0, 256, 256);
475        this.drawPanorama(par1, par2, par3);
476        GL11.glDisable(GL11.GL_TEXTURE_2D);
477        GL11.glEnable(GL11.GL_TEXTURE_2D);
478        this.rotateAndBlurSkybox(par3);
479        this.rotateAndBlurSkybox(par3);
480        this.rotateAndBlurSkybox(par3);
481        this.rotateAndBlurSkybox(par3);
482        this.rotateAndBlurSkybox(par3);
483        this.rotateAndBlurSkybox(par3);
484        this.rotateAndBlurSkybox(par3);
485        this.rotateAndBlurSkybox(par3);
486        GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
487        Tessellator tessellator = Tessellator.instance;
488        tessellator.startDrawingQuads();
489        float f1 = this.width > this.height ? 120.0F / (float)this.width : 120.0F / (float)this.height;
490        float f2 = (float)this.height * f1 / 256.0F;
491        float f3 = (float)this.width * f1 / 256.0F;
492        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
493        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
494        tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
495        int k = this.width;
496        int l = this.height;
497        tessellator.addVertexWithUV(0.0D, (double)l, (double)this.zLevel, (double)(0.5F - f2), (double)(0.5F + f3));
498        tessellator.addVertexWithUV((double)k, (double)l, (double)this.zLevel, (double)(0.5F - f2), (double)(0.5F - f3));
499        tessellator.addVertexWithUV((double)k, 0.0D, (double)this.zLevel, (double)(0.5F + f2), (double)(0.5F - f3));
500        tessellator.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(0.5F + f2), (double)(0.5F + f3));
501        tessellator.draw();
502    }
503
504    /**
505     * Draws the screen and all the components in it.
506     */
507    public void drawScreen(int par1, int par2, float par3)
508    {
509        this.renderSkybox(par1, par2, par3);
510        Tessellator tessellator = Tessellator.instance;
511        short short1 = 274;
512        int k = this.width / 2 - short1 / 2;
513        byte b0 = 30;
514        this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
515        this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
516        this.mc.renderEngine.func_98187_b("/title/mclogo.png");
517        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
518
519        if ((double)this.updateCounter < 1.0E-4D)
520        {
521            this.drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44);
522            this.drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44);
523            this.drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44);
524            this.drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44);
525            this.drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
526        }
527        else
528        {
529            this.drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 155, 44);
530            this.drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
531        }
532
533        tessellator.setColorOpaque_I(16777215);
534        GL11.glPushMatrix();
535        GL11.glTranslatef((float)(this.width / 2 + 90), 70.0F, 0.0F);
536        GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
537        float f1 = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * (float)Math.PI * 2.0F) * 0.1F);
538        f1 = f1 * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashText) + 32);
539        GL11.glScalef(f1, f1, f1);
540        this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
541        GL11.glPopMatrix();
542        String s = "Minecraft 1.5";
543
544        if (this.mc.isDemo())
545        {
546            s = s + " Demo";
547        }
548
549        List<String> brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings());
550        for (int i = 0; i < brandings.size(); i++)
551        {
552            String brd = brandings.get(i);
553            if (!Strings.isNullOrEmpty(brd))
554            {
555                this.drawString(this.fontRenderer, brd, 2, this.height - ( 10 + i * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
556            }
557        }
558
559        String s1 = "Copyright Mojang AB. Do not distribute!";
560        this.drawString(this.fontRenderer, s1, this.width - this.fontRenderer.getStringWidth(s1) - 2, this.height - 10, 16777215);
561
562        if (this.field_92025_p != null && this.field_92025_p.length() > 0)
563        {
564            drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
565            this.drawString(this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
566            this.drawString(this.fontRenderer, field_96138_a, (this.width - this.field_92024_r) / 2, ((GuiButton)this.buttonList.get(0)).yPosition - 12, 16777215);
567        }
568
569        super.drawScreen(par1, par2, par3);
570    }
571
572    /**
573     * Called when the mouse is clicked.
574     */
575    protected void mouseClicked(int par1, int par2, int par3)
576    {
577        super.mouseClicked(par1, par2, par3);
578
579        if (this.field_92025_p.length() > 0 && par1 >= this.field_92022_t && par1 <= this.field_92020_v && par2 >= this.field_92021_u && par2 <= this.field_92019_w)
580        {
581            GuiConfirmOpenLink guiconfirmopenlink = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
582            guiconfirmopenlink.func_92026_h();
583            this.mc.displayGuiScreen(guiconfirmopenlink);
584        }
585    }
586
587    static Minecraft func_98058_a(GuiMainMenu par0GuiMainMenu)
588    {
589        return par0GuiMainMenu.mc;
590    }
591
592    static void func_98061_a(GuiMainMenu par0GuiMainMenu, StringTranslate par1StringTranslate, int par2, int par3)
593    {
594        par0GuiMainMenu.func_98060_b(par1StringTranslate, par2, par3);
595    }
596
597    static boolean func_98059_a(boolean par0)
598    {
599        field_96139_s = par0;
600        return par0;
601    }
602}