Advertisement
TNT_Block

Untitled

Apr 24th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.87 KB | None | 0 0
  1. package net.minecraft.client.gui;
  2.  
  3. import com.google.common.collect.Lists;
  4.  
  5. import de.TNT_Block_Unkown.screens.altmanager.AltGui;
  6.  
  7. import java.awt.Color;
  8. import java.io.BufferedReader;
  9. import java.io.IOException;
  10. import java.io.InputStreamReader;
  11. import java.net.URI;
  12. import java.util.ArrayList;
  13. import java.util.Calendar;
  14. import java.util.Date;
  15. import java.util.Random;
  16. import java.util.concurrent.atomic.AtomicInteger;
  17. import net.minecraft.client.Minecraft;
  18. import net.minecraft.client.renderer.GlStateManager;
  19. import net.minecraft.client.renderer.OpenGlHelper;
  20. import net.minecraft.client.renderer.Tessellator;
  21. import net.minecraft.client.renderer.WorldRenderer;
  22. import net.minecraft.client.renderer.texture.DynamicTexture;
  23. import net.minecraft.client.resources.I18n;
  24. import net.minecraft.realms.RealmsBridge;
  25. import net.minecraft.util.EnumChatFormatting;
  26. import net.minecraft.util.MathHelper;
  27. import net.minecraft.util.ResourceLocation;
  28. import net.minecraft.world.demo.DemoWorldServer;
  29. import net.minecraft.world.storage.ISaveFormat;
  30. import net.minecraft.world.storage.WorldInfo;
  31. import org.apache.commons.io.Charsets;
  32. import org.apache.logging.log4j.LogManager;
  33. import org.apache.logging.log4j.Logger;
  34. import org.lwjgl.opengl.GL11;
  35. import org.lwjgl.opengl.GLContext;
  36. import org.lwjgl.util.glu.Project;
  37.  
  38. public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
  39. {
  40. private static Integer red = 255;
  41. private static Integer green = 153;
  42. private static Integer blue = 51;
  43. private static final AtomicInteger field_175373_f = new AtomicInteger(0);
  44. private static final Logger logger = LogManager.getLogger();
  45. private static final Random field_175374_h = new Random();
  46.  
  47. /** Counts the number of screen updates. */
  48. private float updateCounter;
  49.  
  50. /** The splash message. */
  51. private String splashText;
  52. private GuiButton buttonResetDemo;
  53.  
  54. /** Timer used to rotate the panorama, increases every tick. */
  55. private int panoramaTimer;
  56.  
  57. /**
  58. * Texture allocated for the current viewport of the main menu's panorama background.
  59. */
  60. private DynamicTexture viewportTexture;
  61. private boolean field_175375_v = true;
  62. private final Object field_104025_t = new Object();
  63. private String field_92025_p;
  64. private String field_146972_A;
  65. private String field_104024_v;
  66. private static final ResourceLocation splashTexts = new ResourceLocation("texts/splashes.txt");
  67. private static final ResourceLocation minecraftTitleTextures = new ResourceLocation("textures/gui/title/minecraft.png");
  68.  
  69. /** An array of all the paths to the panorama pictures. */
  70. private static final ResourceLocation[] titlePanoramaPaths = new ResourceLocation[] {new ResourceLocation("textures/gui/title/background/panorama_0.png"), new ResourceLocation("textures/gui/title/background/panorama_1.png"), new ResourceLocation("textures/gui/title/background/panorama_2.png"), new ResourceLocation("textures/gui/title/background/panorama_3.png"), new ResourceLocation("textures/gui/title/background/panorama_4.png"), new ResourceLocation("textures/gui/title/background/panorama_5.png")};
  71. public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
  72. private int field_92024_r;
  73. private int field_92023_s;
  74. private int field_92022_t;
  75. private int field_92021_u;
  76. private int field_92020_v;
  77. private int field_92019_w;
  78. private ResourceLocation field_110351_G;
  79. private GuiButton field_175372_K;
  80. private static final String __OBFID = "CL_00001154";
  81.  
  82. public GuiMainMenu()
  83. {
  84. this.field_146972_A = field_96138_a;
  85. this.splashText = "missingno";
  86. BufferedReader var1 = null;
  87.  
  88. try
  89. {
  90. ArrayList var2 = Lists.newArrayList();
  91. var1 = new BufferedReader(new InputStreamReader(Minecraft.getMinecraft().getResourceManager().getResource(splashTexts).getInputStream(), Charsets.UTF_8));
  92. String var3;
  93.  
  94. while ((var3 = var1.readLine()) != null)
  95. {
  96. var3 = var3.trim();
  97.  
  98. if (!var3.isEmpty())
  99. {
  100. var2.add(var3);
  101. }
  102. }
  103.  
  104. if (!var2.isEmpty())
  105. {
  106. do
  107. {
  108. this.splashText = (String)var2.get(field_175374_h.nextInt(var2.size()));
  109. }
  110. while (this.splashText.hashCode() == 125780783);
  111. }
  112. }
  113. catch (IOException var12)
  114. {
  115. ;
  116. }
  117. finally
  118. {
  119. if (var1 != null)
  120. {
  121. try
  122. {
  123. var1.close();
  124. }
  125. catch (IOException var11)
  126. {
  127. ;
  128. }
  129. }
  130. }
  131.  
  132. this.updateCounter = field_175374_h.nextFloat();
  133. this.field_92025_p = "";
  134.  
  135. if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported())
  136. {
  137. this.field_92025_p = I18n.format("title.oldgl1", new Object[0]);
  138. this.field_146972_A = I18n.format("title.oldgl2", new Object[0]);
  139. this.field_104024_v = "https://help.mojang.com/customer/portal/articles/325948?ref=game";
  140. }
  141. }
  142.  
  143. /**
  144. * Called from the main game loop to update the screen.
  145. */
  146. public void updateScreen()
  147. {
  148. ++this.panoramaTimer;
  149. }
  150.  
  151. /**
  152. * Returns true if this GUI should pause the game when it is displayed in single-player
  153. */
  154. public boolean doesGuiPauseGame()
  155. {
  156. return false;
  157. }
  158.  
  159. /**
  160. * Fired when a key is typed (except F11 who toggle full screen). This is the equivalent of
  161. * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
  162. */
  163. protected void keyTyped(char typedChar, int keyCode) throws IOException {}
  164.  
  165. /**
  166. * Adds the buttons (and other controls) to the screen in question.
  167. */
  168. public void initGui()
  169. {
  170. this.viewportTexture = new DynamicTexture(256, 256);
  171. this.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation("background", this.viewportTexture);
  172. Calendar var1 = Calendar.getInstance();
  173. var1.setTime(new Date());
  174.  
  175. if (var1.get(2) + 1 == 11 && var1.get(5) == 9)
  176. {
  177. this.splashText = "Happy birthday, ez!";
  178. }
  179. else if (var1.get(2) + 1 == 6 && var1.get(5) == 1)
  180. {
  181. this.splashText = "Happy birthday, Notch!";
  182. }
  183. else if (var1.get(2) + 1 == 12 && var1.get(5) == 24)
  184. {
  185. this.splashText = "Merry X-mas!";
  186. }
  187. else if (var1.get(2) + 1 == 1 && var1.get(5) == 1)
  188. {
  189. this.splashText = "Happy new year!";
  190. }
  191. else if (var1.get(2) + 1 == 10 && var1.get(5) == 31)
  192. {
  193. this.splashText = "OOoooOOOoooo! Spooky!";
  194. }
  195.  
  196. boolean var2 = true;
  197. int var3 = this.height / 4 + 48;
  198.  
  199. if (this.mc.isDemo())
  200. {
  201. this.addDemoButtons(var3, 24);
  202. }
  203. else
  204. {
  205. this.addSingleplayerMultiplayerButtons(var3, 24);
  206. }
  207.  
  208. this.buttonList.add(new GuiButton(0, this.width / 2 - 100, var3 + 72 + 12, 98, 20, "§e" + I18n.format("menu.options", new Object[0])));
  209. this.buttonList.add(new GuiButton(4, this.width / 2 + 2, var3 + 72 + 12, 98, 20, "§e" + I18n.format("menu.quit", new Object[0])));
  210. this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var3 + 72 + 12));
  211. Object var4 = this.field_104025_t;
  212.  
  213. synchronized (this.field_104025_t)
  214. {
  215. this.field_92023_s = this.fontRendererObj.getStringWidth(this.field_92025_p);
  216. this.field_92024_r = this.fontRendererObj.getStringWidth(this.field_146972_A);
  217. int var5 = Math.max(this.field_92023_s, this.field_92024_r);
  218. this.field_92022_t = (this.width - var5) / 2;
  219. this.field_92021_u = ((GuiButton)this.buttonList.get(0)).yPosition - 24;
  220. this.field_92020_v = this.field_92022_t + var5;
  221. this.field_92019_w = this.field_92021_u + 24;
  222. }
  223. }
  224.  
  225. /**
  226. * Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.
  227. */
  228. private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)
  229. {
  230. this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, "§e" + I18n.format("menu.singleplayer", new Object[0])));
  231. this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, "§e" + I18n.format("menu.multiplayer", new Object[0])));
  232. this.buttonList.add(new GuiButton(5000, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 98, 20, "§aDirect-Login"));
  233. this.buttonList.add(new GuiButton(5001, this.width / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, "§aAlt-Manager"));
  234. }
  235.  
  236. /**
  237. * Adds Demo buttons on Main Menu for players who are playing Demo.
  238. */
  239. private void addDemoButtons(int p_73972_1_, int p_73972_2_)
  240. {
  241. this.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, "§e" + I18n.format("menu.playdemo", new Object[0])));
  242. this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, "§e" + I18n.format("menu.resetdemo", new Object[0])));
  243. ISaveFormat var3 = this.mc.getSaveLoader();
  244. WorldInfo var4 = var3.getWorldInfo("Demo_World");
  245.  
  246. if (var4 == null)
  247. {
  248. this.buttonResetDemo.enabled = false;
  249. }
  250. }
  251. protected void actionPerformed(GuiButton button) throws IOException
  252. {
  253. if (button.id == 0)
  254. {
  255. this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
  256. }
  257.  
  258. if (button.id == 5)
  259. {
  260. this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
  261. }
  262.  
  263. if (button.id == 1)
  264. {
  265. this.mc.displayGuiScreen(new GuiSelectWorld(this));
  266. }
  267.  
  268. if (button.id == 2)
  269. {
  270. this.mc.displayGuiScreen(new GuiMultiplayer(this));
  271. }
  272.  
  273. if (button.id == 14 && this.field_175372_K.visible)
  274. {
  275. this.switchToRealms();
  276. }
  277.  
  278. if (button.id == 4)
  279. {
  280. this.mc.shutdown();
  281. }
  282.  
  283. if (button.id == 11)
  284. {
  285. this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
  286. }
  287. if (button.id == 5000)
  288. {
  289. de.TNT_Block_Unkown.screens.LoginGui l = new de.TNT_Block_Unkown.screens.LoginGui();
  290. l.setVisible(true);
  291. }
  292. if (button.id == 5001)
  293. {
  294. de.TNT_Block_Unkown.alts.AltController.showAltGui();
  295. }
  296. if (button.id == 12)
  297. {
  298. ISaveFormat var2 = this.mc.getSaveLoader();
  299. WorldInfo var3 = var2.getWorldInfo("Demo_World");
  300.  
  301. if (var3 != null)
  302. {
  303. GuiYesNo var4 = GuiSelectWorld.func_152129_a(this, var3.getWorldName(), 12);
  304. this.mc.displayGuiScreen(var4);
  305. }
  306. }
  307. }
  308.  
  309. private void switchToRealms()
  310. {
  311. RealmsBridge var1 = new RealmsBridge();
  312. var1.switchToRealms(this);
  313. }
  314.  
  315. public void confirmClicked(boolean result, int id)
  316. {
  317. if (result && id == 12)
  318. {
  319. ISaveFormat var6 = this.mc.getSaveLoader();
  320. var6.flushCache();
  321. var6.deleteWorldDirectory("Demo_World");
  322. this.mc.displayGuiScreen(this);
  323. }
  324. else if (id == 13)
  325. {
  326. if (result)
  327. {
  328. try
  329. {
  330. Class var3 = Class.forName("java.awt.Desktop");
  331. Object var4 = var3.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
  332. var3.getMethod("browse", new Class[] {URI.class}).invoke(var4, new Object[] {new URI(this.field_104024_v)});
  333. }
  334. catch (Throwable var5)
  335. {
  336. logger.error("Couldn\'t open link", var5);
  337. }
  338. }
  339.  
  340. this.mc.displayGuiScreen(this);
  341. }
  342. }
  343.  
  344. /**
  345. * Draws the main menu panorama
  346. */
  347. private void drawPanorama(int p_73970_1_, int p_73970_2_, float p_73970_3_)
  348. {
  349. Tessellator var4 = Tessellator.getInstance();
  350. WorldRenderer var5 = var4.getWorldRenderer();
  351. GlStateManager.matrixMode(5889);
  352. GlStateManager.pushMatrix();
  353. GlStateManager.loadIdentity();
  354. Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
  355. GlStateManager.matrixMode(5888);
  356. GlStateManager.pushMatrix();
  357. GlStateManager.loadIdentity();
  358. GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  359. GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
  360. GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
  361. GlStateManager.enableBlend();
  362. GlStateManager.disableAlpha();
  363. GlStateManager.disableCull();
  364. GlStateManager.depthMask(false);
  365. GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  366. byte var6 = 8;
  367.  
  368. for (int var7 = 0; var7 < var6 * var6; ++var7)
  369. {
  370. GlStateManager.pushMatrix();
  371. float var8 = ((float)(var7 % var6) / (float)var6 - 0.5F) / 64.0F;
  372. float var9 = ((float)(var7 / var6) / (float)var6 - 0.5F) / 64.0F;
  373. float var10 = 0.0F;
  374. GlStateManager.translate(var8, var9, var10);
  375. GlStateManager.rotate(MathHelper.sin(((float)this.panoramaTimer + p_73970_3_) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
  376. GlStateManager.rotate(-((float)this.panoramaTimer + p_73970_3_) * 0.1F, 0.0F, 1.0F, 0.0F);
  377.  
  378. for (int var11 = 0; var11 < 6; ++var11)
  379. {
  380. GlStateManager.pushMatrix();
  381.  
  382. if (var11 == 1)
  383. {
  384. GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
  385. }
  386.  
  387. if (var11 == 2)
  388. {
  389. GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
  390. }
  391.  
  392. if (var11 == 3)
  393. {
  394. GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
  395. }
  396.  
  397. if (var11 == 4)
  398. {
  399. GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
  400. }
  401.  
  402. if (var11 == 5)
  403. {
  404. GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
  405. }
  406.  
  407. this.mc.getTextureManager().bindTexture(titlePanoramaPaths[var11]);
  408. var5.startDrawingQuads();
  409. var5.func_178974_a(16777215, 255 / (var7 + 1));
  410. float var12 = 0.0F;
  411. var5.addVertexWithUV(-1.0D, -1.0D, 1.0D, (double)(0.0F + var12), (double)(0.0F + var12));
  412. var5.addVertexWithUV(1.0D, -1.0D, 1.0D, (double)(1.0F - var12), (double)(0.0F + var12));
  413. var5.addVertexWithUV(1.0D, 1.0D, 1.0D, (double)(1.0F - var12), (double)(1.0F - var12));
  414. var5.addVertexWithUV(-1.0D, 1.0D, 1.0D, (double)(0.0F + var12), (double)(1.0F - var12));
  415. var4.draw();
  416. GlStateManager.popMatrix();
  417. }
  418.  
  419. GlStateManager.popMatrix();
  420. GlStateManager.colorMask(true, true, true, false);
  421. }
  422.  
  423. var5.setTranslation(0.0D, 0.0D, 0.0D);
  424. GlStateManager.colorMask(true, true, true, true);
  425. GlStateManager.matrixMode(5889);
  426. GlStateManager.popMatrix();
  427. GlStateManager.matrixMode(5888);
  428. GlStateManager.popMatrix();
  429. GlStateManager.depthMask(true);
  430. GlStateManager.enableCull();
  431. GlStateManager.enableDepth();
  432. }
  433.  
  434. /**
  435. * Rotate and blurs the skybox view in the main menu
  436. */
  437. private void rotateAndBlurSkybox(float p_73968_1_)
  438. {
  439. this.mc.getTextureManager().bindTexture(this.field_110351_G);
  440. GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
  441. GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
  442. GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
  443. GlStateManager.enableBlend();
  444. GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  445. GlStateManager.colorMask(true, true, true, false);
  446. Tessellator var2 = Tessellator.getInstance();
  447. WorldRenderer var3 = var2.getWorldRenderer();
  448. var3.startDrawingQuads();
  449. GlStateManager.disableAlpha();
  450. byte var4 = 3;
  451.  
  452. for (int var5 = 0; var5 < var4; ++var5)
  453. {
  454. var3.func_178960_a(1.0F, 1.0F, 1.0F, 1.0F / (float)(var5 + 1));
  455. int var6 = this.width;
  456. int var7 = this.height;
  457. float var8 = (float)(var5 - var4 / 2) / 256.0F;
  458. var3.addVertexWithUV((double)var6, (double)var7, (double)this.zLevel, (double)(0.0F + var8), 1.0D);
  459. var3.addVertexWithUV((double)var6, 0.0D, (double)this.zLevel, (double)(1.0F + var8), 1.0D);
  460. var3.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(1.0F + var8), 0.0D);
  461. var3.addVertexWithUV(0.0D, (double)var7, (double)this.zLevel, (double)(0.0F + var8), 0.0D);
  462. }
  463.  
  464. var2.draw();
  465. GlStateManager.enableAlpha();
  466. GlStateManager.colorMask(true, true, true, true);
  467. }
  468.  
  469. /**
  470. * Renders the skybox in the main menu
  471. */
  472. private void renderSkybox(int p_73971_1_, int p_73971_2_, float p_73971_3_)
  473. {
  474. this.mc.getFramebuffer().unbindFramebuffer();
  475. GlStateManager.viewport(0, 0, 256, 256);
  476. //this.drawPanorama(p_73971_1_, p_73971_2_, p_73971_3_);
  477. this.rotateAndBlurSkybox(p_73971_3_);
  478. this.rotateAndBlurSkybox(p_73971_3_);
  479. this.rotateAndBlurSkybox(p_73971_3_);
  480. this.rotateAndBlurSkybox(p_73971_3_);
  481. this.rotateAndBlurSkybox(p_73971_3_);
  482. this.rotateAndBlurSkybox(p_73971_3_);
  483. this.rotateAndBlurSkybox(p_73971_3_);
  484. this.mc.getFramebuffer().bindFramebuffer(true);
  485. GlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
  486. Tessellator var4 = Tessellator.getInstance();
  487. WorldRenderer var5 = var4.getWorldRenderer();
  488. var5.startDrawingQuads();
  489. float var6 = this.width > this.height ? 120.0F / (float)this.width : 120.0F / (float)this.height;
  490. float var7 = (float)this.height * var6 / 256.0F;
  491. float var8 = (float)this.width * var6 / 256.0F;
  492. var5.func_178960_a(1.0F, 1.0F, 1.0F, 1.0F);
  493. int var9 = this.width;
  494. int var10 = this.height;
  495. var5.addVertexWithUV(0.0D, (double)var10, (double)this.zLevel, (double)(0.5F - var7), (double)(0.5F + var8));
  496. var5.addVertexWithUV((double)var9, (double)var10, (double)this.zLevel, (double)(0.5F - var7), (double)(0.5F - var8));
  497. var5.addVertexWithUV((double)var9, 0.0D, (double)this.zLevel, (double)(0.5F + var7), (double)(0.5F - var8));
  498. var5.addVertexWithUV(0.0D, 0.0D, (double)this.zLevel, (double)(0.5F + var7), (double)(0.5F + var8));
  499. var4.draw();
  500. }
  501.  
  502. /**
  503. * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
  504. */
  505. public void drawScreen(int mouseX, int mouseY, float partialTicks)
  506. {
  507. if(red == 240 || red != 50 && red < 240) {
  508. red--;
  509. }else {
  510. red++;
  511. }
  512. if(green == 240 || green != 25) {
  513. green--;
  514. }else {
  515. green++;
  516. }
  517. if(blue == 240 || blue != 25) {
  518. blue--;
  519. }else {
  520. blue++;
  521. }
  522. System.out.println("red " + red);
  523. System.out.println("green " + green);
  524. System.out.println("blue " + blue);
  525. Color start = new Color(red, green, blue);
  526. Color end = new Color(red - 50, green - 10, 0);
  527. this.drawGradientRect(0, 0, this.width, this.height, start.getRGB(), end.getRGB());
  528. GlStateManager.disableAlpha();
  529. // this.renderSkybox(mouseX, mouseY, partialTicks);
  530. GlStateManager.enableAlpha();
  531. Tessellator var4 = Tessellator.getInstance();
  532. WorldRenderer var5 = var4.getWorldRenderer();
  533. short var6 = 274;
  534. int var7 = this.width / 2 - var6 / 2;
  535. byte var8 = 30;
  536. this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
  537. this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
  538. this.mc.getTextureManager().bindTexture(minecraftTitleTextures);
  539. GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  540.  
  541. if ((double)this.updateCounter < 1.0E-4D)
  542. {
  543. this.drawTexturedModalRect(var7 + 0, var8 + 0, 0, 0, 99, 44);
  544. this.drawTexturedModalRect(var7 + 99, var8 + 0, 129, 0, 27, 44);
  545. this.drawTexturedModalRect(var7 + 99 + 26, var8 + 0, 126, 0, 3, 44);
  546. this.drawTexturedModalRect(var7 + 99 + 26 + 3, var8 + 0, 99, 0, 26, 44);
  547. this.drawTexturedModalRect(var7 + 155, var8 + 0, 0, 45, 155, 44);
  548. }
  549. else
  550. {
  551. this.drawTexturedModalRect(var7 + 0, var8 + 0, 0, 0, 155, 44);
  552. this.drawTexturedModalRect(var7 + 155, var8 + 0, 0, 45, 155, 44);
  553. }
  554.  
  555. var5.func_178991_c(-1);
  556. GlStateManager.pushMatrix();
  557. GlStateManager.translate((float)(this.width / 2 + 90), 70.0F, 0.0F);
  558. GlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);
  559. float var9 = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * (float)Math.PI * 2.0F) * 0.1F);
  560. var9 = var9 * 100.0F / (float)(this.fontRendererObj.getStringWidth(this.splashText) + 32);
  561. GlStateManager.scale(var9, var9, var9);
  562. this.drawCenteredString(this.fontRendererObj, this.splashText, 0, -8, -256);
  563. GlStateManager.popMatrix();
  564. String var10 = "Minecraft 1.8";
  565.  
  566. if (this.mc.isDemo())
  567. {
  568. var10 = var10 + " Demo";
  569. }
  570.  
  571. this.drawString(this.fontRendererObj, var10, 2, this.height - 10, -1);
  572. String var11 = "Copyright Mojang AB. Do not distribute!";
  573. this.drawString(this.fontRendererObj, var11, this.width - this.fontRendererObj.getStringWidth(var11) - 2, this.height - 10, -1);
  574.  
  575. if (this.field_92025_p != null && this.field_92025_p.length() > 0)
  576. {
  577. drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
  578. this.drawString(this.fontRendererObj, this.field_92025_p, this.field_92022_t, this.field_92021_u, -1);
  579. this.drawString(this.fontRendererObj, this.field_146972_A, (this.width - this.field_92024_r) / 2, ((GuiButton)this.buttonList.get(0)).yPosition - 12, -1);
  580. }
  581.  
  582. super.drawScreen(mouseX, mouseY, partialTicks);
  583. }
  584.  
  585. /**
  586. * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
  587. */
  588. protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
  589. {
  590. super.mouseClicked(mouseX, mouseY, mouseButton);
  591. Object var4 = this.field_104025_t;
  592.  
  593. synchronized (this.field_104025_t)
  594. {
  595. if (this.field_92025_p.length() > 0 && mouseX >= this.field_92022_t && mouseX <= this.field_92020_v && mouseY >= this.field_92021_u && mouseY <= this.field_92019_w)
  596. {
  597. GuiConfirmOpenLink var5 = new GuiConfirmOpenLink(this, this.field_104024_v, 13, true);
  598. var5.disableSecurityWarning();
  599. this.mc.displayGuiScreen(var5);
  600. }
  601. }
  602. }
  603. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement