Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. //
  2. // Decompiled by Procyon v0.5.30
  3. //
  4.  
  5. package me.aristhena.client.module.modules.render.hud;
  6.  
  7. import java.util.Iterator;
  8.  
  9. import org.lwjgl.opengl.GL11;
  10.  
  11. import net.minecraft.client.Minecraft;
  12. import net.minecraft.client.gui.GuiChat;
  13. import net.minecraft.client.gui.ScaledResolution;
  14. import me.aristhena.utils.ClientUtils;
  15. import me.aristhena.utils.minecraft.FontRenderer;
  16. import me.salamander.client.module.modules.render.ClientColor;
  17. import me.salamander.utils.RenderUtils;
  18. import net.minecraft.client.renderer.GlStateManager;
  19. import net.minecraft.util.MathHelper;
  20.  
  21. import java.util.Date;
  22. import java.awt.Color;
  23. import java.text.SimpleDateFormat;
  24.  
  25. import me.aristhena.client.Client;
  26. import me.aristhena.client.module.Module;
  27. import me.aristhena.client.module.ModuleManager;
  28. import me.aristhena.client.module.modules.render.Hud;
  29. import me.aristhena.event.events.Render2DEvent;
  30.  
  31. public class IndigoTheme extends Theme
  32. {
  33. private float[] hue;
  34. private ClientColor cc;
  35. int ypos;
  36. private static Minecraft mc;
  37.  
  38. public IndigoTheme(final String name, final boolean value, final Module module) {
  39. super(name, value, module);
  40. this.hue = new float[] { 0.0f };
  41. }
  42.  
  43. @Override
  44. public boolean onRender(final Render2DEvent event) {
  45. if (super.onRender(event)) {
  46. final SimpleDateFormat formatDate = new SimpleDateFormat("hh:mm a");
  47. final String timeString = formatDate.format(new Date());
  48. ClientUtils.clientFont().drawStringWithShadow("Alien", 2.0, 3.0, new Color((int)ClientColor.red, (int)ClientColor.green, (int)ClientColor.blue).getRGB());
  49. GL11.glPopMatrix();
  50. GL11.glPushMatrix();
  51. ClientUtils.clientFont().drawStringWithShadow(timeString, 2.0, 12.5, 1358954495);
  52. GL11.glPopMatrix();
  53. GL11.glPushMatrix();
  54. int y = 2;
  55. this.ypos = 2;
  56. final int i = 0;
  57. final float[] huee = { this.hue[0] };
  58. for (final Module mod : ModuleManager.getModulesForRender()) {
  59. if (mod.isShown() && mod.isEnabled()) {
  60. final int mwidth = ScaledResolution.getScaledWidth();
  61. final int mheight = 10 * i + 1;
  62. final int color = Color.getHSBColor(huee[0] / 255.0f, 1.0f, 1.0f).getRGB();
  63. final String nig = (mod.suffix.length() > 0) ? ("§7 " + mod.suffix) : "";
  64. if (mod.isShown()) {
  65. if (Hud.german) {
  66. RenderUtils.drawRect(ScaledResolution.getScaledWidth() - 1.5f, (float)(this.ypos - 2), (float)ScaledResolution.getScaledWidth(), (float)(this.ypos + 8), mod.getColor());
  67. if (Hud.lowercase) {
  68. RenderUtils.drawRect((float)(ScaledResolution.getScaledWidth() - ClientUtils.clientFont().getStringWidth(String.valueOf(mod.displayName.toLowerCase()) + nig.toLowerCase()) - 4), (float)(this.ypos - 2), (float)ScaledResolution.getScaledWidth(), (float)(this.ypos + 8), Integer.MIN_VALUE);
  69. mod.drawDisplayName(event.getWidth() - ClientUtils.clientFont().getStringWidth(mod.getDisplayName().toLowerCase()) - 2.3f, y - 0.6f, mod.getColor());
  70. }
  71. else {
  72. RenderUtils.drawRect((float)(ScaledResolution.getScaledWidth() - ClientUtils.clientFont().getStringWidth(String.valueOf(mod.displayName) + nig) - 4), (float)(this.ypos - 2), (float)ScaledResolution.getScaledWidth(), (float)(this.ypos + 8), Integer.MIN_VALUE);
  73. mod.drawDisplayName(event.getWidth() - ClientUtils.clientFont().getStringWidth(mod.getDisplayName()) - 2.3f, y - 0.6f, mod.getColor());
  74. }
  75. }
  76. else if (Hud.lowercase) {
  77. mod.drawDisplayName(event.getWidth() - ClientUtils.clientFont().getStringWidth(mod.getDisplayName().toLowerCase()) - 2.3f, y - 0.6f, mod.getColor());
  78. }
  79. else {
  80. mod.drawDisplayName(event.getWidth() - ClientUtils.clientFont().getStringWidth(mod.getDisplayName()) - 2.3f, y - 0.6f, mod.getColor());
  81. }
  82. }
  83. y += 10;
  84. this.ypos += 10;
  85. final float[] array = huee;
  86. final int n = 0;
  87. final float[] array3 = array;
  88. final int n4 = 0;
  89. array3[n4] += 9.0f;
  90. if (huee[0] > 255.0f) {
  91. final float[] array2 = huee;
  92. final int n2 = 0;
  93. final float[] array4 = array2;
  94. final int n5 = 0;
  95. array4[n5] -= 255.0f;
  96. }
  97. final int tmp270_269 = 0;
  98. final float[] hue2;
  99. final float[] tmp270_270 = hue2 = this.hue;
  100. final int n6 = 0;
  101. hue2[n6] += (float)0.05;
  102. if (this.hue[0] <= 255.0f) {
  103. continue;
  104. }
  105. final float[] hue = this.hue;
  106. final int n3 = 0;
  107. final float[] array5 = hue;
  108. final int n7 = 0;
  109. array5[n7] -= 255.0f;
  110. }
  111. }
  112. }
  113. return super.onRender(event);
  114. }
  115.  
  116. private void drawFPS() {
  117. final ScaledResolution scaledResolution = new ScaledResolution(ClientUtils.mc(), ClientUtils.mc().displayWidth, ClientUtils.mc().displayHeight);
  118. final int x = 4;
  119. final int n;
  120. int y = n = ScaledResolution.getScaledHeight() - 2;
  121. ClientUtils.mc();
  122. y = n - (Minecraft.fontRendererObj.FONT_HEIGHT + 1);
  123. ClientUtils.mc();
  124. if (Minecraft.currentScreen instanceof GuiChat) {
  125. y -= 13;
  126. }
  127. final FontRenderer clientFont = ClientUtils.clientFont();
  128. final StringBuilder sb = new StringBuilder("FPS§f: ");
  129. ClientUtils.mc();
  130. GL11.glPopMatrix();
  131. GL11.glPushMatrix();
  132. clientFont.drawStringWithShadow(sb.append(Minecraft.debugFPS).toString(), 4.0, 77.0, -26411758);
  133. GL11.glPopMatrix();
  134. GL11.glPushMatrix();
  135. }
  136.  
  137. private void drawCoordinates() {
  138. ClientUtils.clientFont().drawStringWithShadow("x: §f" + MathHelper.floor_double(ClientUtils.player().posX), 2.0, 98.0, -26411758);
  139. ClientUtils.clientFont().drawStringWithShadow("y: §f" + MathHelper.floor_double(ClientUtils.player().posY), 2.0, 108.0, -26411758);
  140. ClientUtils.clientFont().drawStringWithShadow("z: §f" + MathHelper.floor_double(ClientUtils.player().posZ), 2.0, 118.0, -26411758);
  141. }
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement