Advertisement
Guest User

Bee.class

a guest
Nov 25th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 14.18 KB | None | 0 0
  1. import java.awt.Desktop;
  2. import java.io.BufferedReader;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5. import java.lang.reflect.Method;
  6. import java.net.URI;
  7. import java.util.ArrayList;
  8. import java.util.List;
  9. import java.util.Random;
  10. import net.minecraft.realms.RealmsBridge;
  11. import org.apache.commons.io.Charsets;
  12. import org.apache.logging.log4j.LogManager;
  13. import org.apache.logging.log4j.Logger;
  14. import org.lwjgl.opengl.ContextCapabilities;
  15. import org.lwjgl.opengl.GL11;
  16. import org.lwjgl.opengl.GLContext;
  17. import org.lwjgl.util.glu.Project;
  18.  
  19. public class bee
  20.   extends bdw
  21.   implements bcv
  22. {
  23.   private static final Logger f = ;
  24.   private static final Random g = new Random();
  25.   private float h;
  26.   private String i;
  27.   private bcb r;
  28.   private int s;
  29.   private bpq t;
  30.   private final Object u = new Object();
  31.   private String v;
  32.   private String w;
  33.   private String x;
  34.   private static final bqx y = new bqx("texts/splashes.txt");
  35.   private static final bqx z = new bqx("textures/gui/title/minecraft.png");
  36.   private static final bqx[] A = { new bqx("textures/gui/title/background/panorama_0.png"), new bqx("textures/gui/title/background/panorama_1.png"), new bqx("textures/gui/title/background/panorama_2.png"), new bqx("textures/gui/title/background/panorama_3.png"), new bqx("textures/gui/title/background/panorama_4.png"), new bqx("textures/gui/title/background/panorama_5.png") };
  37.   public static final String a = "Please click " + a.t + "here" + a.v + " for more information.";
  38.   private int B;
  39.   private int C;
  40.   private int D;
  41.   private int E;
  42.   private int F;
  43.   private int G;
  44.   private bqx H;
  45.   private static final String __OBFID = "CL_00001154";
  46.  
  47.   public bee()
  48.   {
  49.     this.w = a;
  50.     this.i = "missingno";
  51.     BufferedReader var1 = null;
  52.     try
  53.     {
  54.       ArrayList var2 = new ArrayList();
  55.       var1 = new BufferedReader(new InputStreamReader(bao.B().Q().a(y).b(), Charsets.UTF_8));
  56.       String var3;
  57.       while ((var3 = var1.readLine()) != null)
  58.       {
  59.         var3 = var3.trim();
  60.         if (!var3.isEmpty()) {
  61.           var2.add(var3);
  62.         }
  63.       }
  64.       if (!var2.isEmpty()) {
  65.         do
  66.         {
  67.           this.i = ((String)var2.get(g.nextInt(var2.size())));
  68.         } while (this.i.hashCode() == 125780783);
  69.       }
  70.       if (var1 != null) {
  71.         try
  72.         {
  73.           var1.close();
  74.         }
  75.         catch (IOException localIOException) {}
  76.       }
  77.       this.h = g.nextFloat();
  78.     }
  79.     catch (IOException localIOException1) {}finally
  80.     {
  81.       if (var1 != null) {
  82.         try
  83.         {
  84.           var1.close();
  85.         }
  86.         catch (IOException localIOException3) {}
  87.       }
  88.     }
  89.     this.v = "";
  90.     if ((!GLContext.getCapabilities().OpenGL20) && (!buu.b()))
  91.     {
  92.       this.v = brp.a("title.oldgl1", new Object[0]);
  93.       this.w = brp.a("title.oldgl2", new Object[0]);
  94.       this.x = "https://help.mojang.com/customer/portal/articles/325948?ref=game";
  95.     }
  96.   }
  97.  
  98.   public void e()
  99.   {
  100.     this.s += 1;
  101.   }
  102.  
  103.   public boolean d()
  104.   {
  105.     return false;
  106.   }
  107.  
  108.   protected void a(char p_73869_1_, int p_73869_2_) {}
  109.  
  110.   public void b()
  111.   {
  112.     this.t = new bpq(256, 256);
  113.     this.H = this.k.P().a("background", this.t);
  114.    
  115.     boolean var2 = true;
  116.     int var3 = this.m / 4 + 48;
  117.     if (this.k.u()) {
  118.       c(var3, 24);
  119.     } else {
  120.       b(var3, 24);
  121.     }
  122.     this.n.add(new bcb(0, this.l / 2 - 100, var3 + 72 + 12, 98, 20, brp.a("��7��lOptions", new Object[0])));
  123.     this.n.add(new bcb(4, this.l / 2 + 2, var3 + 72 + 12, 98, 20, brp.a("��4��lQuitter", new Object[0])));
  124.     this.n.add(new bcf(5, this.l / 2 - 124, var3 + 72 + 12));
  125.     Object var4 = this.u;
  126.     synchronized (this.u)
  127.     {
  128.       this.C = this.q.a(this.v);
  129.       this.B = this.q.a(this.w);
  130.       int var5 = Math.max(this.C, this.B);
  131.       this.D = ((this.l - var5) / 2);
  132.       this.E = (((bcb)this.n.get(0)).i - 24);
  133.       this.F = (this.D + var5);
  134.       this.G = (this.E + 24);
  135.     }
  136.   }
  137.  
  138.   private void b(int par1, int par2)
  139.   {
  140.     this.n.add(new bcb(1, this.l / 2 + 105, par1, 98, 20, "��7��lSolo"));
  141.     this.n.add(new bcb(31, this.l / 2 - 100, par2 + par2 + par1, 98, 20, "��c��lForum"));
  142.     this.n.add(new bcb(32, this.l / 2 + 2, par2 + par2 + par1, 98, 20, "��3��lTS3"));
  143.     this.n.add(new bcb(33, this.l / 2 - 100, par1 + par2 * 1, "��6��lEterniumProject"));
  144.     this.n.add(new bcb(34, this.l / 2 - 100, par1, 98, 20, "��9��lAltisRP"));
  145.     this.n.add(new bcb(35, this.l / 2 + 2, par1, 98, 20, "��2��lNovaRP"));
  146.   }
  147.  
  148.   private void c(int p_73972_1_, int p_73972_2_)
  149.   {
  150.     this.n.add(new bcb(11, this.l / 2 - 100, p_73972_1_, brp.a("menu.playdemo", new Object[0])));
  151.     this.n.add(this.r = new bcb(12, this.l / 2 - 100, p_73972_1_ + p_73972_2_ * 1, brp.a("menu.resetdemo", new Object[0])));
  152.     aze var3 = this.k.d();
  153.     ays var4 = var3.c("Demo_World");
  154.     if (var4 == null) {
  155.       this.r.l = false;
  156.     }
  157.   }
  158.  
  159.   protected void a(bcb p_146284_1_)
  160.   {
  161.     if (p_146284_1_.k == 0) {
  162.       this.k.a(new bdm(this, this.k.u));
  163.     }
  164.     if (p_146284_1_.k == 5) {
  165.       this.k.a(new bdj(this, this.k.u, this.k.S()));
  166.     }
  167.     if (p_146284_1_.k == 1) {
  168.       this.k.a(new bdx(this));
  169.     }
  170.     if (p_146284_1_.k == 2) {
  171.       this.k.a(new bfz(this));
  172.     }
  173.     if (p_146284_1_.k == 14) {
  174.       a();
  175.     }
  176.     if (p_146284_1_.k == 4) {
  177.       this.k.k();
  178.     }
  179.     if (p_146284_1_.k == 11) {
  180.       this.k.a("Demo_World", "Demo_World", mk.a);
  181.     }
  182.     if (p_146284_1_.k == 12)
  183.     {
  184.       aze var2 = this.k.d();
  185.       ays var3 = var2.c("Demo_World");
  186.       if (var3 != null)
  187.       {
  188.         bcw var4 = bdx.a(this, var3.k(), 12);
  189.         this.k.a(var4);
  190.       }
  191.     }
  192.     if (p_146284_1_.k == 31)
  193.     {
  194.       Desktop desktop = null;
  195.       try
  196.       {
  197.         URI url = new URI("https://www.google.fr");
  198.         if (Desktop.isDesktopSupported())
  199.         {
  200.           desktop = Desktop.getDesktop();
  201.           desktop.browse(url);
  202.         }
  203.       }
  204.       catch (Exception localException) {}
  205.     }
  206.     if (p_146284_1_.k == 32)
  207.     {
  208.       Desktop desktop = null;
  209.       try
  210.       {
  211.         URI url = new URI("ts3server://teamspeak-3.crystal-serv.com?port=11111");
  212.         if (Desktop.isDesktopSupported())
  213.         {
  214.           desktop = Desktop.getDesktop();
  215.           desktop.browse(url);
  216.         }
  217.       }
  218.       catch (Exception localException1) {}
  219.     }
  220.     if (p_146284_1_.k == 33)
  221.     {
  222.       Desktop desktop = null;
  223.       try
  224.       {
  225.         URI url = new URI("https://www.google.fr");
  226.         if (Desktop.isDesktopSupported())
  227.         {
  228.           desktop = Desktop.getDesktop();
  229.           desktop.browse(url);
  230.         }
  231.       }
  232.       catch (Exception localException2) {}
  233.     }
  234.     if (p_146284_1_.k == 34) {
  235.       this.k.a(new bcx(this, this.k, "#", 0));
  236.     }
  237.     if (p_146284_1_.k == 35) {
  238.       this.k.a(new bcx(this, this.k, "37.59.31.165", 26090));
  239.     }
  240.   }
  241.  
  242.   private void a()
  243.   {
  244.     RealmsBridge var1 = new RealmsBridge();
  245.     var1.switchToRealms(this);
  246.   }
  247.  
  248.   public void a(boolean p_73878_1_, int p_73878_2_)
  249.   {
  250.     if ((p_73878_1_) && (p_73878_2_ == 12))
  251.     {
  252.       aze var6 = this.k.d();
  253.       var6.d();
  254.       var6.e("Demo_World");
  255.       this.k.a(this);
  256.     }
  257.     else if (p_73878_2_ == 13)
  258.     {
  259.       if (p_73878_1_) {
  260.         try
  261.         {
  262.           Class var3 = Class.forName("java.awt.Desktop");
  263.           Object var4 = var3.getMethod("getDesktop", new Class[0]).invoke(null, new Object[0]);
  264.           var3.getMethod("browse", new Class[] { URI.class }).invoke(var4, new Object[] { new URI(this.x) });
  265.         }
  266.         catch (Throwable var5)
  267.         {
  268.           f.error("Couldn't open link", var5);
  269.         }
  270.       }
  271.       this.k.a(this);
  272.     }
  273.   }
  274.  
  275.   private void b(int p_73970_1_, int p_73970_2_, float p_73970_3_)
  276.   {
  277.     bmh var4 = bmh.a;
  278.     GL11.glMatrixMode(5889);
  279.     GL11.glPushMatrix();
  280.     GL11.glLoadIdentity();
  281.     Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
  282.     GL11.glMatrixMode(5888);
  283.     GL11.glPushMatrix();
  284.     GL11.glLoadIdentity();
  285.     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  286.     GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
  287.     GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
  288.     GL11.glEnable(3042);
  289.     GL11.glDisable(3008);
  290.     GL11.glDisable(2884);
  291.     GL11.glDepthMask(false);
  292.     buu.c(770, 771, 1, 0);
  293.     byte var5 = 8;
  294.     for (int var6 = 0; var6 < var5 * var5; var6++)
  295.     {
  296.       GL11.glPushMatrix();
  297.       float var7 = (var6 % var5 / var5 - 0.5F) / 64.0F;
  298.       float var8 = (var6 / var5 / var5 - 0.5F) / 64.0F;
  299.       float var9 = 0.0F;
  300.       GL11.glTranslatef(var7, var8, var9);
  301.       GL11.glRotatef(qh.a((this.s + p_73970_3_) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
  302.       GL11.glRotatef(-(this.s + p_73970_3_) * 0.1F, 0.0F, 1.0F, 0.0F);
  303.       for (int var10 = 0; var10 < 6; var10++)
  304.       {
  305.         GL11.glPushMatrix();
  306.         if (var10 == 1) {
  307.           GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
  308.         }
  309.         if (var10 == 2) {
  310.           GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
  311.         }
  312.         if (var10 == 3) {
  313.           GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
  314.         }
  315.         if (var10 == 4) {
  316.           GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
  317.         }
  318.         if (var10 == 5) {
  319.           GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
  320.         }
  321.         this.k.P().a(A[var10]);
  322.         var4.b();
  323.         var4.a(16777215, 255 / (var6 + 1));
  324.         float var11 = 0.0F;
  325.         var4.a(-1.0D, -1.0D, 1.0D, 0.0F + var11, 0.0F + var11);
  326.         var4.a(1.0D, -1.0D, 1.0D, 1.0F - var11, 0.0F + var11);
  327.         var4.a(1.0D, 1.0D, 1.0D, 1.0F - var11, 1.0F - var11);
  328.         var4.a(-1.0D, 1.0D, 1.0D, 0.0F + var11, 1.0F - var11);
  329.         var4.a();
  330.         GL11.glPopMatrix();
  331.       }
  332.       GL11.glPopMatrix();
  333.       GL11.glColorMask(true, true, true, false);
  334.     }
  335.     var4.b(0.0D, 0.0D, 0.0D);
  336.     GL11.glColorMask(true, true, true, true);
  337.     GL11.glMatrixMode(5889);
  338.     GL11.glPopMatrix();
  339.     GL11.glMatrixMode(5888);
  340.     GL11.glPopMatrix();
  341.     GL11.glDepthMask(true);
  342.     GL11.glEnable(2884);
  343.     GL11.glEnable(2929);
  344.   }
  345.  
  346.   private void a(float p_73968_1_)
  347.   {
  348.     this.k.P().a(this.H);
  349.     GL11.glTexParameteri(3553, 10241, 9729);
  350.     GL11.glTexParameteri(3553, 10240, 9729);
  351.     GL11.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
  352.     GL11.glEnable(3042);
  353.     buu.c(770, 771, 1, 0);
  354.     GL11.glColorMask(true, true, true, false);
  355.     bmh var2 = bmh.a;
  356.     var2.b();
  357.     GL11.glDisable(3008);
  358.     byte var3 = 3;
  359.     for (int var4 = 0; var4 < var3; var4++)
  360.     {
  361.       var2.a(1.0F, 1.0F, 1.0F, 1.0F / (var4 + 1));
  362.       int var5 = this.l;
  363.       int var6 = this.m;
  364.       float var7 = (var4 - var3 / 2) / 256.0F;
  365.       var2.a(var5, var6, this.e, 0.0F + var7, 1.0D);
  366.       var2.a(var5, 0.0D, this.e, 1.0F + var7, 1.0D);
  367.       var2.a(0.0D, 0.0D, this.e, 1.0F + var7, 0.0D);
  368.       var2.a(0.0D, var6, this.e, 0.0F + var7, 0.0D);
  369.     }
  370.     var2.a();
  371.     GL11.glEnable(3008);
  372.     GL11.glColorMask(true, true, true, true);
  373.   }
  374.  
  375.   private void c(int p_73971_1_, int p_73971_2_, float p_73971_3_)
  376.   {
  377.     this.k.a().e();
  378.     GL11.glViewport(0, 0, 256, 256);
  379.     b(p_73971_1_, p_73971_2_, p_73971_3_);
  380.     a(p_73971_3_);
  381.     a(p_73971_3_);
  382.     a(p_73971_3_);
  383.     a(p_73971_3_);
  384.     a(p_73971_3_);
  385.     a(p_73971_3_);
  386.     a(p_73971_3_);
  387.     this.k.a().a(true);
  388.     GL11.glViewport(0, 0, this.k.d, this.k.e);
  389.     bmh var4 = bmh.a;
  390.     var4.b();
  391.     float var5 = this.l > this.m ? 120.0F / this.l : 120.0F / this.m;
  392.     float var6 = this.m * var5 / 256.0F;
  393.     float var7 = this.l * var5 / 256.0F;
  394.     var4.a(1.0F, 1.0F, 1.0F, 1.0F);
  395.     int var8 = this.l;
  396.     int var9 = this.m;
  397.     var4.a(0.0D, var9, this.e, 0.5F - var6, 0.5F + var7);
  398.     var4.a(var8, var9, this.e, 0.5F - var6, 0.5F - var7);
  399.     var4.a(var8, 0.0D, this.e, 0.5F + var6, 0.5F - var7);
  400.     var4.a(0.0D, 0.0D, this.e, 0.5F + var6, 0.5F + var7);
  401.     var4.a();
  402.   }
  403.  
  404.   public void a(int p_73863_1_, int p_73863_2_, float p_73863_3_)
  405.   {
  406.     GL11.glDisable(3008);
  407.     c(p_73863_1_, p_73863_2_, p_73863_3_);
  408.     GL11.glEnable(3008);
  409.     bmh var4 = bmh.a;
  410.     short var5 = 274;
  411.     int var6 = this.l / 2 - var5 / 2;
  412.     byte var7 = 30;
  413.     a(0, 0, this.l, this.m, -2130706433, 16777215);
  414.     a(0, 0, this.l, this.m, 0, Integer.MIN_VALUE);
  415.     this.k.P().a(z);
  416.     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  417.     if (this.h < 1.0E-4D)
  418.     {
  419.       b(var6 + 0, var7 + 0, 0, 0, 99, 44);
  420.       b(var6 + 99, var7 + 0, 129, 0, 27, 44);
  421.       b(var6 + 99 + 26, var7 + 0, 126, 0, 3, 44);
  422.       b(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
  423.       b(var6 + 155, var7 + 0, 0, 45, 155, 44);
  424.     }
  425.     else
  426.     {
  427.       b(var6 + 0, var7 + 0, 0, 0, 155, 44);
  428.       b(var6 + 155, var7 + 0, 0, 45, 155, 44);
  429.     }
  430.     var4.c(-1);
  431.     GL11.glPushMatrix();
  432.     GL11.glTranslatef(this.l / 2 + 90, 70.0F, 0.0F);
  433.     GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
  434.     float var8 = 1.8F - qh.e(qh.a((float)(bao.K() % 1000L) / 1000.0F * 3.1415927F * 2.0F) * 0.1F);
  435.     var8 = var8 * 100.0F / (this.q.a(this.i) + 32);
  436.     GL11.glScalef(var8, var8, var8);
  437.     a(this.q, this.i, 0, -8, 65280);
  438.     GL11.glPopMatrix();
  439.     String var9 = "Minecraft 1.7.10";
  440.     if (this.k.u()) {
  441.       var9 = var9 + " Demo";
  442.     }
  443.     b(this.q, var9, 2, this.m - 10, -1);
  444.     String var10 = "Copyright Mojang AB. Do not distribute!";
  445.     b(this.q, var10, this.l - this.q.a(var10) - 2, this.m - 10, -1);
  446.     if ((this.v != null) && (this.v.length() > 0))
  447.     {
  448.       a(this.D - 2, this.E - 2, this.F + 2, this.G - 1, 1428160512);
  449.       b(this.q, this.v, this.D, this.E, -1);
  450.       b(this.q, this.w, (this.l - this.B) / 2, ((bcb)this.n.get(0)).i - 12, -1);
  451.     }
  452.     super.a(p_73863_1_, p_73863_2_, p_73863_3_);
  453.   }
  454.  
  455.   protected void a(int p_73864_1_, int p_73864_2_, int p_73864_3_)
  456.   {
  457.     super.a(p_73864_1_, p_73864_2_, p_73864_3_);
  458.     Object var4 = this.u;
  459.     synchronized (this.u)
  460.     {
  461.       if ((this.v.length() > 0) && (p_73864_1_ >= this.D) && (p_73864_1_ <= this.F) && (p_73864_2_ >= this.E) && (p_73864_2_ <= this.G))
  462.       {
  463.         bcu var5 = new bcu(this, this.x, 13, true);
  464.         var5.f();
  465.         this.k.a(var5);
  466.       }
  467.     }
  468.   }
  469. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement