Advertisement
TNT_Block

Untitled

Apr 24th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. private static int redcolor = 153;
  2. private static boolean redhochRunter;
  3.  
  4. private static int greencolor = 153;
  5. private static boolean greenhochRunter;
  6.  
  7. private static int bluecolor = 255;
  8. private static boolean bluehochRunter;
  9. public void drawScreen(int mouseX, int mouseY, float partialTicks) {
  10. if (redcolor == 153)
  11. redhochRunter = false;
  12.  
  13. if (redcolor == 2) {
  14. redhochRunter = true;
  15. }
  16.  
  17. if (redhochRunter)
  18. redcolor++;
  19. if (!redhochRunter)
  20. redcolor--;
  21. // --
  22. if (greencolor == 153)
  23. greenhochRunter = false;
  24.  
  25. if (greencolor == 2) {
  26. greenhochRunter = true;
  27. }
  28.  
  29. if (greenhochRunter)
  30. greencolor++;
  31. if (!greenhochRunter)
  32. greencolor--;
  33. // --
  34. if (bluecolor == 255)
  35. bluehochRunter = false;
  36.  
  37. if (bluecolor == 155) {
  38. bluehochRunter = true;
  39. }
  40.  
  41. if (bluehochRunter)
  42. bluecolor++;
  43. if (!bluehochRunter)
  44. bluecolor--;
  45.  
  46. Color test = new Color(redcolor,greencolor,bluecolor);
  47. if (greencolor <= 24) {
  48. try {
  49. this.drawGradientRect(0, 0, this.width, this.height, test.getRGB(), new Color(redcolor - 25, greencolor, bluecolor - 25).getRGB());
  50. }catch (IllegalArgumentException iae) {
  51. this.drawGradientRect(0, 0, this.width, this.height, test.getRGB(), new Color(redcolor, greencolor, bluecolor - 25).getRGB());
  52. }
  53. }else {
  54. try {
  55. this.drawGradientRect(0, 0, this.width, this.height, test.getRGB(), new Color(redcolor - 25, greencolor - 25, bluecolor - 25).getRGB());
  56. }catch (IllegalArgumentException iae) {
  57. this.drawGradientRect(0, 0, this.width, this.height, test.getRGB(), new Color(redcolor, greencolor - 25, bluecolor - 25).getRGB());
  58. }
  59. }
  60. GlStateManager.disableAlpha();
  61. this.renderSkybox(mouseX, mouseY, partialTicks);
  62. GlStateManager.enableAlpha();
  63. Tessellator var4 = Tessellator.getInstance();
  64. WorldRenderer var5 = var4.getWorldRenderer();
  65. short var6 = 274;
  66. int var7 = this.width / 2 - var6 / 2;
  67. byte var8 = 30;
  68. this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
  69. this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
  70. this.mc.getTextureManager().bindTexture(minecraftTitleTextures);
  71. GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  72.  
  73. if ((double) this.updateCounter < 1.0E-4D) {
  74. this.drawTexturedModalRect(var7 + 0, var8 + 0, 0, 0, 99, 44);
  75. this.drawTexturedModalRect(var7 + 99, var8 + 0, 129, 0, 27, 44);
  76. this.drawTexturedModalRect(var7 + 99 + 26, var8 + 0, 126, 0, 3, 44);
  77. this.drawTexturedModalRect(var7 + 99 + 26 + 3, var8 + 0, 99, 0, 26, 44);
  78. this.drawTexturedModalRect(var7 + 155, var8 + 0, 0, 45, 155, 44);
  79. } else {
  80. this.drawTexturedModalRect(var7 + 0, var8 + 0, 0, 0, 155, 44);
  81. this.drawTexturedModalRect(var7 + 155, var8 + 0, 0, 45, 155, 44);
  82. }
  83.  
  84. var5.func_178991_c(-1);
  85. GlStateManager.pushMatrix();
  86. GlStateManager.translate((float) (this.width / 2 + 90), 70.0F, 0.0F);
  87. GlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);
  88. float var9 = 1.8F - MathHelper.abs(
  89. MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * (float) Math.PI * 2.0F) * 0.1F);
  90. var9 = var9 * 100.0F / (float) (this.fontRendererObj.getStringWidth(this.splashText) + 32);
  91. GlStateManager.scale(var9, var9, var9);
  92. this.drawCenteredString(this.fontRendererObj, this.splashText, 0, -8, -256);
  93. GlStateManager.popMatrix();
  94. String var10 = "Minecraft 1.8";
  95.  
  96. if (this.mc.isDemo()) {
  97. var10 = var10 + " Demo";
  98. }
  99.  
  100. this.drawString(this.fontRendererObj, var10, 2, this.height - 10, -1);
  101. String var11 = "Copyright Mojang AB. Do not distribute!";
  102. this.drawString(this.fontRendererObj, var11, this.width - this.fontRendererObj.getStringWidth(var11) - 2,
  103. this.height - 10, -1);
  104.  
  105. if (this.field_92025_p != null && this.field_92025_p.length() > 0) {
  106. drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1,
  107. 1428160512);
  108. this.drawString(this.fontRendererObj, this.field_92025_p, this.field_92022_t, this.field_92021_u, -1);
  109. this.drawString(this.fontRendererObj, this.field_146972_A, (this.width - this.field_92024_r) / 2,
  110. ((GuiButton) this.buttonList.get(0)).yPosition - 12, -1);
  111. }
  112.  
  113. super.drawScreen(mouseX, mouseY, partialTicks);
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement