Guest User

Untitled

a guest
Nov 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 44.85 KB | None | 0 0
  1. import java.nio.IntBuffer;
  2. import java.util.ArrayList;
  3. import java.util.Arrays;
  4. import java.util.Collections;
  5. import java.util.List;
  6. import java.util.Random;
  7. import net.minecraft.client.Minecraft;
  8. import org.lwjgl.opengl.ARBOcclusionQuery;
  9. import org.lwjgl.opengl.GL11;
  10.  
  11. public class i
  12.   implements yi
  13. {
  14.   public List a = new ArrayList();
  15.   private ru i;
  16.   private ur j;
  17.   private List k = new ArrayList();
  18.   private bv[] l;
  19.   private bv[] m;
  20.   private int n;
  21.   private int o;
  22.   private int p;
  23.   private int q;
  24.   private Minecraft r;
  25.   private qn s;
  26.   private IntBuffer t;
  27.   private boolean u = false;
  28.   private int v = 0;
  29.   private int w;
  30.   private int x;
  31.   private int y;
  32.   private int z;
  33.   private int A;
  34.   private int B;
  35.   private int C;
  36.   private int D;
  37.   private int E;
  38.   private int F = -1;
  39.  
  40.   private int G = 2;
  41.   private int H;
  42.   private int I;
  43.   private int J;
  44.   int[] b = new int[50000];
  45.   IntBuffer c = dl.d(64);
  46.   private int K;
  47.   private int L;
  48.   private int M;
  49.   private int N;
  50.   private int O;
  51.   private int P;
  52.   private List Q = new ArrayList();
  53.  
  54.   private kv[] R = { new kv(), new kv(), new kv(), new kv() };
  55.  
  56.   double d = -9999.0D;
  57.   double e = -9999.0D;
  58.   double f = -9999.0D;
  59.   public float g;
  60.   int h = 0;
  61.  
  62.   public i(Minecraft paramMinecraft, ur paramur)
  63.   {
  64.     this.r = paramMinecraft;
  65.     this.j = paramur;
  66.     int i1 = 64;
  67.     this.q = dl.a(i1 * i1 * i1 * 3);
  68.  
  69.     this.u = paramMinecraft.n().a();
  70.     if (this.u) {
  71.       this.c.clear();
  72.  
  73.       this.t = dl.d(i1 * i1 * i1);
  74.       this.t.clear();
  75.       this.t.position(0);
  76.       this.t.limit(i1 * i1 * i1);
  77.       ARBOcclusionQuery.glGenQueriesARB(this.t);
  78.     }
  79.  
  80.     this.w = dl.a(3);
  81.  
  82.     GL11.glPushMatrix();
  83.     GL11.glNewList(this.w, 4864);
  84.     f();
  85.     GL11.glEndList();
  86.     GL11.glPopMatrix();
  87.  
  88.     xd localxd = xd.a;
  89.     this.x = (this.w + 1);
  90.     GL11.glNewList(this.x, 4864);
  91.  
  92.     int i2 = 64;
  93.     int i3 = 256 / i2 + 2;
  94.     float f1 = 16.0F;
  95.     int i5;
  96.     for (int i4 = -i2 * i3; i4 <= i2 * i3; i4 += i2) {
  97.       for (i5 = -i2 * i3; i5 <= i2 * i3; i5 += i2) {
  98.         localxd.b();
  99.         localxd.a(i4 + 0, f1, i5 + 0);
  100.         localxd.a(i4 + i2, f1, i5 + 0);
  101.         localxd.a(i4 + i2, f1, i5 + i2);
  102.         localxd.a(i4 + 0, f1, i5 + i2);
  103.         localxd.a();
  104.       }
  105.     }
  106.     GL11.glEndList();
  107.  
  108.     this.y = (this.w + 2);
  109.     GL11.glNewList(this.y, 4864);
  110.     f1 = -16.0F;
  111.     localxd.b();
  112.     for (i4 = -i2 * i3; i4 <= i2 * i3; i4 += i2) {
  113.       for (i5 = -i2 * i3; i5 <= i2 * i3; i5 += i2) {
  114.         localxd.a(i4 + i2, f1, i5 + 0);
  115.         localxd.a(i4 + 0, f1, i5 + 0);
  116.         localxd.a(i4 + 0, f1, i5 + i2);
  117.         localxd.a(i4 + i2, f1, i5 + i2);
  118.       }
  119.     }
  120.     localxd.a();
  121.     GL11.glEndList();
  122.   }
  123.  
  124.   private void f() {
  125.     Random localRandom = new Random(10842L);
  126.     xd localxd = xd.a;
  127.     localxd.b();
  128.     for (int i1 = 0; i1 < 1500; i1++) {
  129.       double d1 = localRandom.nextFloat() * 2.0F - 1.0F;
  130.       double d2 = localRandom.nextFloat() * 2.0F - 1.0F;
  131.       double d3 = localRandom.nextFloat() * 2.0F - 1.0F;
  132.       double d4 = 0.25F + localRandom.nextFloat() * 0.25F;
  133.       double d5 = d1 * d1 + d2 * d2 + d3 * d3;
  134.       if ((d5 < 1.0D) && (d5 > 0.01D)) {
  135.         d5 = 1.0D / Math.sqrt(d5);
  136.         d1 *= d5;
  137.         d2 *= d5;
  138.         d3 *= d5;
  139.         double d6 = d1 * 100.0D;
  140.         double d7 = d2 * 100.0D;
  141.         double d8 = d3 * 100.0D;
  142.  
  143.         double d9 = Math.atan2(d1, d3);
  144.         double d10 = Math.sin(d9);
  145.         double d11 = Math.cos(d9);
  146.  
  147.         double d12 = Math.atan2(Math.sqrt(d1 * d1 + d3 * d3), d2);
  148.         double d13 = Math.sin(d12);
  149.         double d14 = Math.cos(d12);
  150.  
  151.         double d15 = localRandom.nextDouble() * 3.141592653589793D * 2.0D;
  152.         double d16 = Math.sin(d15);
  153.         double d17 = Math.cos(d15);
  154.  
  155.         for (int i2 = 0; i2 < 4; i2++) {
  156.           double d18 = 0.0D;
  157.           double d19 = ((i2 & 0x2) - 1) * d4;
  158.           double d20 = ((i2 + 1 & 0x2) - 1) * d4;
  159.  
  160.           double d21 = d18;
  161.           double d22 = d19 * d17 - d20 * d16;
  162.           double d23 = d20 * d17 + d19 * d16;
  163.  
  164.           double d24 = d23;
  165.           double d25 = d22 * d13 + d21 * d14;
  166.           double d26 = d21 * d13 - d22 * d14;
  167.  
  168.           double d27 = d26 * d10 - d24 * d11;
  169.           double d28 = d25;
  170.           double d29 = d24 * d10 + d26 * d11;
  171.  
  172.           localxd.a(d6 + d27, d7 + d28, d8 + d29);
  173.         }
  174.       }
  175.     }
  176.     localxd.a();
  177.   }
  178.  
  179.   public void a(ru paramru) {
  180.     if (this.i != null) {
  181.       this.i.b(this);
  182.     }
  183.  
  184.     this.d = -9999.0D;
  185.     this.e = -9999.0D;
  186.     this.f = -9999.0D;
  187.  
  188.     aal.a.a(paramru);
  189.     this.i = paramru;
  190.     this.s = new qn(paramru);
  191.     if (paramru != null) {
  192.       paramru.a(this);
  193.       a();
  194.     }
  195.   }
  196.  
  197.   public void a()
  198.   {
  199.     lq.L.b(this.r.z.j);
  200.     this.F = this.r.z.e;
  201.     if (this.m != null) {
  202.       for (i1 = 0; i1 < this.m.length; i1++) {
  203.         this.m[i1].c();
  204.       }
  205.     }
  206.  
  207.     int i1 = 64 << 3 - this.F;
  208.     if (i1 > 400) i1 = 400;
  209.  
  210.     this.n = (i1 / 16 + 1);
  211.     this.i.getClass(); this.o = ('€' / 16);
  212.     this.p = (i1 / 16 + 1);
  213.  
  214.     this.m = new bv[this.n * this.o * this.p];
  215.     this.l = new bv[this.n * this.o * this.p];
  216.     int i2 = 0;
  217.     int i3 = 0;
  218.  
  219.     this.z = 0;
  220.     this.A = 0;
  221.     this.B = 0;
  222.     this.C = this.n;
  223.     this.D = this.o;
  224.     this.E = this.p;
  225.     for (int i4 = 0; i4 < this.k.size(); i4++) {
  226.       ((bv)this.k.get(i4)).u = false;
  227.     }
  228.     this.k.clear();
  229.  
  230.     this.a.clear();
  231.  
  232.     for (i4 = 0; i4 < this.n; i4++) {
  233.       for (int i5 = 0; i5 < this.o; i5++) {
  234.         for (int i6 = 0; i6 < this.p; i6++) {
  235.           this.m[((i6 * this.o + i5) * this.n + i4)] = new bv(this.i, this.a, i4 * 16, i5 * 16, i6 * 16, 16, this.q + i2);
  236.           if (this.u) {
  237.             this.m[((i6 * this.o + i5) * this.n + i4)].z = this.t.get(i3);
  238.           }
  239.           this.m[((i6 * this.o + i5) * this.n + i4)].y = false;
  240.           this.m[((i6 * this.o + i5) * this.n + i4)].x = true;
  241.           this.m[((i6 * this.o + i5) * this.n + i4)].o = true;
  242.           this.m[((i6 * this.o + i5) * this.n + i4)].w = (i3++);
  243.           this.m[((i6 * this.o + i5) * this.n + i4)].f();
  244.           this.l[((i6 * this.o + i5) * this.n + i4)] = this.m[((i6 * this.o + i5) * this.n + i4)];
  245.           this.k.add(this.m[((i6 * this.o + i5) * this.n + i4)]);
  246.  
  247.           i2 += 3;
  248.         }
  249.       }
  250.     }
  251.  
  252.     if (this.i != null) {
  253.       wc localwc = this.r.i;
  254.       if (localwc != null) {
  255.         b(et.b(localwc.o), et.b(localwc.p), et.b(localwc.q));
  256.         Arrays.sort(this.l, new fe(localwc));
  257.       }
  258.     }
  259.     this.G = 2;
  260.   }
  261.  
  262.   public void a(ax paramax, adt paramadt, float paramFloat)
  263.   {
  264.     if (this.G > 0) {
  265.       this.G -= 1;
  266.       return;
  267.     }
  268.     vw.a.a(this.i, this.j, this.r.q, this.r.i, paramFloat);
  269.     aal.a.a(this.i, this.j, this.r.q, this.r.i, this.r.z, paramFloat);
  270.  
  271.     this.H = 0;
  272.     this.I = 0;
  273.     this.J = 0;
  274.  
  275.     wc localwc = this.r.i;
  276.     aal.b = localwc.N + (localwc.o - localwc.N) * paramFloat;
  277.     aal.c = localwc.O + (localwc.p - localwc.O) * paramFloat;
  278.     aal.d = localwc.P + (localwc.q - localwc.P) * paramFloat;
  279.     vw.b = localwc.N + (localwc.o - localwc.N) * paramFloat;
  280.     vw.c = localwc.O + (localwc.p - localwc.O) * paramFloat;
  281.     vw.d = localwc.P + (localwc.q - localwc.P) * paramFloat;
  282.  
  283.     this.r.t.b(paramFloat);
  284.  
  285.     List localList = this.i.p();
  286.     this.H = localList.size();
  287.     ki localki;
  288.     for (int i1 = 0; i1 < this.i.j.size(); i1++) {
  289.       localki = (ki)this.i.j.get(i1);
  290.       this.I += 1;
  291.       if (!localki.a(paramax)) continue; aal.a.a(localki, paramFloat);
  292.     }
  293.  
  294.     for (i1 = 0; i1 < localList.size(); i1++) {
  295.       localki = (ki)localList.get(i1);
  296.  
  297.       if ((!localki.a(paramax)) || ((!localki.an) && (!paramadt.a(localki.y))) || (
  298.         (localki == this.r.i) && (!this.r.z.C) && (!this.r.i.ah()))) continue;
  299.       int i2 = et.b(localki.p);
  300.       if (i2 < 0) i2 = 0;
  301.       this.i.getClass(); if (i2 >= 128) { this.i.getClass(); i2 = '€' - 1; }
  302.       if (!this.i.d(et.b(localki.o), i2, et.b(localki.q))) {
  303.         continue;
  304.       }
  305.       this.I += 1;
  306.       aal.a.a(localki, paramFloat);
  307.     }
  308.  
  309.     ov.b();
  310.     for (i1 = 0; i1 < this.a.size(); i1++) {
  311.       vw.a.a((ij)this.a.get(i1), paramFloat);
  312.     }
  313.  
  314.     this.r.t.a(paramFloat);
  315.   }
  316.  
  317.   public String b() {
  318.     return "C: " + this.N + "/" + this.K + ". F: " + this.L + ", O: " + this.M + ", E: " + this.O;
  319.   }
  320.  
  321.   public String c() {
  322.     return "E: " + this.I + "/" + this.H + ". B: " + this.J + ", I: " + (this.H - this.J - this.I);
  323.   }
  324.  
  325.   private void b(int paramInt1, int paramInt2, int paramInt3)
  326.   {
  327.     paramInt1 -= 8;
  328.     paramInt2 -= 8;
  329.     paramInt3 -= 8;
  330.     this.z = 2147483647;
  331.     this.A = 2147483647;
  332.     this.B = 2147483647;
  333.     this.C = -2147483648;
  334.     this.D = -2147483648;
  335.     this.E = -2147483648;
  336.  
  337.     int i1 = this.n * 16;
  338.     int i2 = i1 / 2;
  339.  
  340.     for (int i3 = 0; i3 < this.n; i3++) {
  341.       int i4 = i3 * 16;
  342.  
  343.       int i5 = i4 + i2 - paramInt1;
  344.       if (i5 < 0) i5 -= i1 - 1;
  345.       i5 /= i1;
  346.       i4 -= i5 * i1;
  347.  
  348.       if (i4 < this.z) this.z = i4;
  349.       if (i4 > this.C) this.C = i4;
  350.  
  351.       for (int i6 = 0; i6 < this.p; i6++) {
  352.         int i7 = i6 * 16;
  353.         int i8 = i7 + i2 - paramInt3;
  354.         if (i8 < 0) i8 -= i1 - 1;
  355.         i8 /= i1;
  356.         i7 -= i8 * i1;
  357.  
  358.         if (i7 < this.B) this.B = i7;
  359.         if (i7 > this.E) this.E = i7;
  360.  
  361.         for (int i9 = 0; i9 < this.o; i9++) {
  362.           int i10 = i9 * 16;
  363.           if (i10 < this.A) this.A = i10;
  364.           if (i10 > this.D) this.D = i10;
  365.  
  366.           bv localbv = this.m[((i6 * this.o + i9) * this.n + i3)];
  367.           boolean bool = localbv.u;
  368.           localbv.a(i4, i10, i7);
  369.           if ((!bool) && (localbv.u))
  370.             this.k.add(localbv);
  371.         }
  372.       }
  373.     }
  374.   }
  375.  
  376.   public int a(wc paramwc, int paramInt, double paramDouble)
  377.   {
  378.     for (int i1 = 0; i1 < 10; i1++) {
  379.       this.P = ((this.P + 1) % this.m.length);
  380.       bv localbv1 = this.m[this.P];
  381.       if ((localbv1.u) && (!this.k.contains(localbv1))) {
  382.         this.k.add(localbv1);
  383.       }
  384.  
  385.     }
  386.  
  387.     if (this.r.z.e != this.F) {
  388.       a();
  389.     }
  390.     if (paramInt == 0) {
  391.       this.K = 0;
  392.       this.L = 0;
  393.       this.M = 0;
  394.       this.N = 0;
  395.       this.O = 0;
  396.     }
  397.  
  398.     double d1 = paramwc.N + (paramwc.o - paramwc.N) * paramDouble;
  399.     double d2 = paramwc.O + (paramwc.p - paramwc.O) * paramDouble;
  400.     double d3 = paramwc.P + (paramwc.q - paramwc.P) * paramDouble;
  401.  
  402.     double d4 = paramwc.o - this.d;
  403.     double d5 = paramwc.p - this.e;
  404.     double d6 = paramwc.q - this.f;
  405.     if (d4 * d4 + d5 * d5 + d6 * d6 > 16.0D) {
  406.       this.d = paramwc.o;
  407.       this.e = paramwc.p;
  408.       this.f = paramwc.q;
  409.  
  410.       b(et.b(paramwc.o), et.b(paramwc.p), et.b(paramwc.q));
  411.       Arrays.sort(this.l, new fe(paramwc));
  412.     }
  413.  
  414.     ov.a();
  415.  
  416.     int i2 = 0;
  417.     if ((this.u) && (this.r.z.h) && (!this.r.z.g) && (paramInt == 0)) {
  418.       int i3 = 0;
  419.       int i4 = 16;
  420.       a(i3, i4);
  421.       for (int i5 = i3; i5 < i4; i5++) {
  422.         this.l[i5].x = true;
  423.       }
  424.  
  425.       i2 += a(i3, i4, paramInt, paramDouble);
  426.       do
  427.       {
  428.         i3 = i4;
  429.         i4 *= 2;
  430.         if (i4 > this.l.length) i4 = this.l.length;
  431.  
  432.         GL11.glDisable(3553);
  433.         GL11.glDisable(2896);
  434.         GL11.glDisable(3008);
  435.         GL11.glDisable(2912);
  436.         GL11.glColorMask(false, false, false, false);
  437.         GL11.glDepthMask(false);
  438.  
  439.         a(i3, i4);
  440.         GL11.glPushMatrix();
  441.         float f1 = 0.0F;
  442.         float f2 = 0.0F;
  443.         float f3 = 0.0F;
  444.         for (int i6 = i3; i6 < i4; i6++)
  445.           if (this.l[i6].e()) {
  446.             this.l[i6].o = false;
  447.           }
  448.           else {
  449.             if (!this.l[i6].o) {
  450.               this.l[i6].x = true;
  451.             }
  452.  
  453.             if ((this.l[i6].o) && (!this.l[i6].y)) {
  454.               float f4 = et.c(this.l[i6].a(paramwc));
  455.  
  456.               int i7 = (int)(1.0F + f4 / 128.0F);
  457.  
  458.               if (this.v % i7 == i6 % i7) {
  459.                 bv localbv2 = this.l[i6];
  460.                 float f5 = (float)(localbv2.i - d1);
  461.                 float f6 = (float)(localbv2.j - d2);
  462.                 float f7 = (float)(localbv2.k - d3);
  463.                 float f8 = f5 - f1;
  464.                 float f9 = f6 - f2;
  465.                 float f10 = f7 - f3;
  466.  
  467.                 if ((f8 != 0.0F) || (f9 != 0.0F) || (f10 != 0.0F)) {
  468.                   GL11.glTranslatef(f8, f9, f10);
  469.                   f1 += f8;
  470.                   f2 += f9;
  471.                   f3 += f10;
  472.                 }
  473.  
  474.                 ARBOcclusionQuery.glBeginQueryARB(35092, this.l[i6].z);
  475.                 this.l[i6].d();
  476.                 ARBOcclusionQuery.glEndQueryARB(35092);
  477.                 this.l[i6].y = true;
  478.               }
  479.             }
  480.           }
  481.         GL11.glPopMatrix();
  482.  
  483.         if (this.r.z.g) {
  484.           if (iv.b == 0) GL11.glColorMask(false, true, true, true); else
  485.             GL11.glColorMask(true, false, false, true);
  486.         }
  487.         else GL11.glColorMask(true, true, true, true);
  488.  
  489.         GL11.glDepthMask(true);
  490.         GL11.glEnable(3553);
  491.         GL11.glEnable(3008);
  492.         GL11.glEnable(2912);
  493.  
  494.         i2 += a(i3, i4, paramInt, paramDouble);
  495.       }
  496.       while (i4 < this.l.length);
  497.     }
  498.     else {
  499.       i2 += a(0, this.l.length, paramInt, paramDouble);
  500.     }
  501.  
  502.     return i2;
  503.   }
  504.  
  505.   private void a(int paramInt1, int paramInt2) {
  506.     for (int i1 = paramInt1; i1 < paramInt2; i1++)
  507.       if (this.l[i1].y) {
  508.         this.c.clear();
  509.         ARBOcclusionQuery.glGetQueryObjectuARB(this.l[i1].z, 34919, this.c);
  510.  
  511.         if (this.c.get(0) != 0) {
  512.           this.l[i1].y = false;
  513.           this.c.clear();
  514.           ARBOcclusionQuery.glGetQueryObjectuARB(this.l[i1].z, 34918, this.c);
  515.           this.l[i1].x = (this.c.get(0) != 0);
  516.         }
  517.       }
  518.   }
  519.  
  520.   private int a(int paramInt1, int paramInt2, int paramInt3, double paramDouble)
  521.   {
  522.     this.Q.clear();
  523.  
  524.     int i1 = 0;
  525.     for (int i2 = paramInt1; i2 < paramInt2; i2++) {
  526.       if (paramInt3 == 0) {
  527.         this.K += 1;
  528.         if (this.l[i2].p[paramInt3] != 0) this.O += 1;
  529.         else if (!this.l[i2].o) this.L += 1;
  530.         else if ((this.u) && (!this.l[i2].x)) this.M += 1; else {
  531.           this.N += 1;
  532.         }
  533.  
  534.       }
  535.  
  536.       if ((this.l[i2].p[paramInt3] == 0) && (this.l[i2].o) && ((!this.u) || (this.l[i2].x))) {
  537.         int i3 = this.l[i2].a(paramInt3);
  538.         if (i3 >= 0) {
  539.           this.Q.add(this.l[i2]);
  540.           i1++;
  541.         }
  542.       }
  543.     }
  544.  
  545.     wc localwc = this.r.i;
  546.     double d1 = localwc.N + (localwc.o - localwc.N) * paramDouble;
  547.     double d2 = localwc.O + (localwc.p - localwc.O) * paramDouble;
  548.     double d3 = localwc.P + (localwc.q - localwc.P) * paramDouble;
  549.  
  550.     int i4 = 0;
  551.     for (int i5 = 0; i5 < this.R.length; i5++) {
  552.       this.R[i5].b();
  553.     }
  554.     for (i5 = 0; i5 < this.Q.size(); i5++) {
  555.       bv localbv = (bv)this.Q.get(i5);
  556.  
  557.       int i6 = -1;
  558.       for (int i7 = 0; i7 < i4; i7++) {
  559.         if (this.R[i7].a(localbv.i, localbv.j, localbv.k)) {
  560.           i6 = i7;
  561.         }
  562.       }
  563.       if (i6 < 0) {
  564.         i6 = i4++;
  565.         this.R[i6].a(localbv.i, localbv.j, localbv.k, d1, d2, d3);
  566.       }
  567.  
  568.       this.R[i6].a(localbv.a(paramInt3));
  569.     }
  570.  
  571.     a(paramInt3, paramDouble);
  572.  
  573.     return i1;
  574.   }
  575.  
  576.   public void a(int paramInt, double paramDouble)
  577.   {
  578.     this.r.t.b(paramDouble);
  579.  
  580.     for (int i1 = 0; i1 < this.R.length; i1++) {
  581.       this.R[i1].a();
  582.     }
  583.  
  584.     this.r.t.a(paramDouble);
  585.   }
  586.  
  587.   public void d() {
  588.     this.v += 1;
  589.   }
  590.  
  591.   public void a(float paramFloat) {
  592.     if (this.r.f.y.c) return;
  593.  
  594.     GL11.glDisable(3553);
  595.  
  596.     ax localax = this.i.a(this.r.i, paramFloat);
  597.     float f1 = (float)localax.a;
  598.     float f2 = (float)localax.b;
  599.     float f3 = (float)localax.c;
  600.  
  601.     if (this.r.z.g) {
  602.       float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
  603.       float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
  604.       f7 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
  605.  
  606.       f1 = f4;
  607.       f2 = f5;
  608.       f3 = f7;
  609.     }
  610.     GL11.glColor3f(f1, f2, f3);
  611.  
  612.     xd localxd = xd.a;
  613.  
  614.     GL11.glDepthMask(false);
  615.  
  616.     GL11.glEnable(2912);
  617.     GL11.glColor3f(f1, f2, f3);
  618.     GL11.glCallList(this.x);
  619.  
  620.     GL11.glDisable(2912);
  621.     GL11.glDisable(3008);
  622.     GL11.glEnable(3042);
  623.     GL11.glBlendFunc(770, 771);
  624.     ov.a();
  625.  
  626.     float[] arrayOfFloat = this.i.y.a(this.i.c(paramFloat), paramFloat);
  627.     if (arrayOfFloat != null) {
  628.       GL11.glDisable(3553);
  629.       GL11.glShadeModel(7425);
  630.  
  631.       GL11.glPushMatrix();
  632.  
  633.       GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
  634.       GL11.glRotatef(et.a(this.i.d(paramFloat)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
  635.  
  636.       f7 = arrayOfFloat[0];
  637.       f8 = arrayOfFloat[1];
  638.       f9 = arrayOfFloat[2];
  639.       float f14;
  640.       if (this.r.z.g) {
  641.         float f10 = (f7 * 30.0F + f8 * 59.0F + f9 * 11.0F) / 100.0F;
  642.         float f12 = (f7 * 30.0F + f8 * 70.0F) / 100.0F;
  643.         f14 = (f7 * 30.0F + f9 * 70.0F) / 100.0F;
  644.  
  645.         f7 = f10;
  646.         f8 = f12;
  647.         f9 = f14;
  648.       }
  649.  
  650.       localxd.a(6);
  651.       localxd.a(f7, f8, f9, arrayOfFloat[3]);
  652.  
  653.       localxd.a(0.0D, 100.0D, 0.0D);
  654.       int i1 = 16;
  655.       localxd.a(arrayOfFloat[0], arrayOfFloat[1], arrayOfFloat[2], 0.0F);
  656.       for (int i2 = 0; i2 <= i1; i2++) {
  657.         f14 = i2 * 3.141593F * 2.0F / i1;
  658.         float f15 = et.a(f14);
  659.         float f16 = et.b(f14);
  660.         localxd.a(f15 * 120.0F, f16 * 120.0F, -f16 * 40.0F * arrayOfFloat[3]);
  661.       }
  662.       localxd.a();
  663.  
  664.       GL11.glPopMatrix();
  665.       GL11.glShadeModel(7424);
  666.     }
  667.  
  668.     GL11.glEnable(3553);
  669.     GL11.glBlendFunc(770, 1);
  670.     GL11.glPushMatrix();
  671.  
  672.     float f6 = 1.0F - this.i.i(paramFloat);
  673.     float f7 = 0.0F;
  674.     float f8 = 0.0F;
  675.     float f9 = 0.0F;
  676.     GL11.glColor4f(1.0F, 1.0F, 1.0F, f6);
  677.     GL11.glTranslatef(f7, f8, f9);
  678.     GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
  679.     GL11.glRotatef(this.i.c(paramFloat) * 360.0F, 1.0F, 0.0F, 0.0F);
  680.     float f11 = 30.0F;
  681.  
  682.     GL11.glBindTexture(3553, this.j.b("/terrain/sun.png"));
  683.     localxd.b();
  684.     localxd.a(-f11, 100.0D, -f11, 0.0D, 0.0D);
  685.     localxd.a(f11, 100.0D, -f11, 1.0D, 0.0D);
  686.     localxd.a(f11, 100.0D, f11, 1.0D, 1.0D);
  687.     localxd.a(-f11, 100.0D, f11, 0.0D, 1.0D);
  688.     localxd.a();
  689.  
  690.     f11 = 20.0F;
  691.     GL11.glBindTexture(3553, this.j.b("/terrain/moon.png"));
  692.     localxd.b();
  693.     localxd.a(-f11, -100.0D, f11, 1.0D, 1.0D);
  694.     localxd.a(f11, -100.0D, f11, 0.0D, 1.0D);
  695.     localxd.a(f11, -100.0D, -f11, 0.0D, 0.0D);
  696.     localxd.a(-f11, -100.0D, -f11, 1.0D, 0.0D);
  697.     localxd.a();
  698.  
  699.     GL11.glDisable(3553);
  700.     float f13 = this.i.g(paramFloat) * f6;
  701.     if (f13 > 0.0F) {
  702.       GL11.glColor4f(f13, f13, f13, f13);
  703.       GL11.glCallList(this.w);
  704.     }
  705.     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  706.  
  707.     GL11.glDisable(3042);
  708.     GL11.glEnable(3008);
  709.     GL11.glEnable(2912);
  710.  
  711.     GL11.glPopMatrix();
  712.     GL11.glDisable(3553);
  713.     GL11.glColor3f(0.0F, 0.0F, 0.0F);
  714.  
  715.     double d1 = this.r.h.g(paramFloat).b - 64.0D;
  716.     if (d1 < 0.0D) {
  717.       GL11.glPushMatrix();
  718.       GL11.glTranslatef(0.0F, 12.0F, 0.0F);
  719.       GL11.glCallList(this.y);
  720.       GL11.glPopMatrix();
  721.  
  722.       f8 = 1.0F;
  723.       f9 = -(float)(d1 + 64.0D);
  724.       f11 = -f8;
  725.       f13 = f9;
  726.  
  727.       localxd.b();
  728.       localxd.a(0, 255);
  729.       localxd.a(-f8, f13, f8);
  730.       localxd.a(f8, f13, f8);
  731.       localxd.a(f8, f11, f8);
  732.       localxd.a(-f8, f11, f8);
  733.  
  734.       localxd.a(-f8, f11, -f8);
  735.       localxd.a(f8, f11, -f8);
  736.       localxd.a(f8, f13, -f8);
  737.       localxd.a(-f8, f13, -f8);
  738.  
  739.       localxd.a(f8, f11, -f8);
  740.       localxd.a(f8, f11, f8);
  741.       localxd.a(f8, f13, f8);
  742.       localxd.a(f8, f13, -f8);
  743.  
  744.       localxd.a(-f8, f13, -f8);
  745.       localxd.a(-f8, f13, f8);
  746.       localxd.a(-f8, f11, f8);
  747.       localxd.a(-f8, f11, -f8);
  748.  
  749.       localxd.a(-f8, f11, -f8);
  750.       localxd.a(-f8, f11, f8);
  751.       localxd.a(f8, f11, f8);
  752.       localxd.a(f8, f11, -f8);
  753.       localxd.a();
  754.     }
  755.  
  756.     if (this.i.y.c())
  757.       GL11.glColor3f(f1 * 0.2F + 0.04F, f2 * 0.2F + 0.04F, f3 * 0.6F + 0.1F);
  758.     else {
  759.       GL11.glColor3f(f1, f2, f3);
  760.     }
  761.     GL11.glPushMatrix();
  762.     GL11.glTranslatef(0.0F, -(float)(d1 - 16.0D), 0.0F);
  763.     GL11.glCallList(this.y);
  764.     GL11.glPopMatrix();
  765.     GL11.glEnable(3553);
  766.  
  767.     GL11.glDepthMask(true);
  768.   }
  769.  
  770.   public void b(float paramFloat)
  771.   {
  772.     if (this.r.f.y.c) return;
  773.  
  774.     if (this.r.z.j) {
  775.       c(paramFloat);
  776.       return;
  777.     }
  778.     GL11.glDisable(2884);
  779.     float f1 = (float)(this.r.i.O + (this.r.i.p - this.r.i.O) * paramFloat);
  780.     int i1 = 32;
  781.     int i2 = 256 / i1;
  782.     xd localxd = xd.a;
  783.  
  784.     GL11.glBindTexture(3553, this.j.b("/environment/clouds.png"));
  785.     GL11.glEnable(3042);
  786.     GL11.glBlendFunc(770, 771);
  787.  
  788.     ax localax = this.i.e(paramFloat);
  789.     float f2 = (float)localax.a;
  790.     float f3 = (float)localax.b;
  791.     float f4 = (float)localax.c;
  792.  
  793.     if (this.r.z.g) {
  794.       f5 = (f2 * 30.0F + f3 * 59.0F + f4 * 11.0F) / 100.0F;
  795.       float f6 = (f2 * 30.0F + f3 * 70.0F) / 100.0F;
  796.       float f7 = (f2 * 30.0F + f4 * 70.0F) / 100.0F;
  797.  
  798.       f2 = f5;
  799.       f3 = f6;
  800.       f4 = f7;
  801.     }
  802.  
  803.     float f5 = 0.0004882813F;
  804.  
  805.     double d1 = this.v + paramFloat + (this.i.J + (this.i.K - this.i.J) * paramFloat) * 24000.0D;
  806.     double d2 = this.r.i.l + (this.r.i.o - this.r.i.l) * paramFloat + d1 * 0.02999999932944775D;
  807.     double d3 = this.r.i.n + (this.r.i.q - this.r.i.n) * paramFloat;
  808.     int i3 = et.b(d2 / 2048.0D);
  809.     int i4 = et.b(d3 / 2048.0D);
  810.     d2 -= i3 * 2048;
  811.     d3 -= i4 * 2048;
  812.  
  813.     float f8 = this.i.y.d() - f1 + 0.33F;
  814.     float f9 = (float)(d2 * f5);
  815.     float f10 = (float)(d3 * f5);
  816.     localxd.b();
  817.  
  818.     localxd.a(f2, f3, f4, 0.8F);
  819.     for (int i5 = -i1 * i2; i5 < i1 * i2; i5 += i1) {
  820.       for (int i6 = -i1 * i2; i6 < i1 * i2; i6 += i1) {
  821.         localxd.a(i5 + 0, f8, i6 + i1, (i5 + 0) * f5 + f9, (i6 + i1) * f5 + f10);
  822.         localxd.a(i5 + i1, f8, i6 + i1, (i5 + i1) * f5 + f9, (i6 + i1) * f5 + f10);
  823.         localxd.a(i5 + i1, f8, i6 + 0, (i5 + i1) * f5 + f9, (i6 + 0) * f5 + f10);
  824.         localxd.a(i5 + 0, f8, i6 + 0, (i5 + 0) * f5 + f9, (i6 + 0) * f5 + f10);
  825.       }
  826.     }
  827.     localxd.a();
  828.  
  829.     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  830.     GL11.glDisable(3042);
  831.     GL11.glEnable(2884);
  832.   }
  833.  
  834.   public boolean a(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat)
  835.   {
  836.     return false;
  837.   }
  838.  
  839.   public void c(float paramFloat) {
  840.     GL11.glDisable(2884);
  841.     float f1 = (float)(this.r.i.O + (this.r.i.p - this.r.i.O) * paramFloat);
  842.     xd localxd = xd.a;
  843.  
  844.     float f2 = 12.0F;
  845.     float f3 = 4.0F;
  846.  
  847.     double d1 = this.v + paramFloat + (this.i.J + (this.i.K - this.i.J) * paramFloat) * 24000.0D;
  848.     double d2 = (this.r.i.l + (this.r.i.o - this.r.i.l) * paramFloat + d1 * 0.02999999932944775D) / f2;
  849.     double d3 = (this.r.i.n + (this.r.i.q - this.r.i.n) * paramFloat) / f2 + 0.3300000131130219D;
  850.     float f4 = this.i.y.d() - f1 + 0.33F;
  851.     int i1 = et.b(d2 / 2048.0D);
  852.     int i2 = et.b(d3 / 2048.0D);
  853.     d2 -= i1 * 2048;
  854.     d3 -= i2 * 2048;
  855.  
  856.     GL11.glBindTexture(3553, this.j.b("/environment/clouds.png"));
  857.     GL11.glEnable(3042);
  858.     GL11.glBlendFunc(770, 771);
  859.  
  860.     ax localax = this.i.e(paramFloat);
  861.     float f5 = (float)localax.a;
  862.     float f6 = (float)localax.b;
  863.     float f7 = (float)localax.c;
  864.  
  865.     if (this.r.z.g) {
  866.       f8 = (f5 * 30.0F + f6 * 59.0F + f7 * 11.0F) / 100.0F;
  867.       f9 = (f5 * 30.0F + f6 * 70.0F) / 100.0F;
  868.       f10 = (f5 * 30.0F + f7 * 70.0F) / 100.0F;
  869.  
  870.       f5 = f8;
  871.       f6 = f9;
  872.       f7 = f10;
  873.     }
  874.  
  875.     float f8 = (float)(d2 * 0.0D);
  876.     float f9 = (float)(d3 * 0.0D);
  877.  
  878.     float f10 = 0.0039063F;
  879.  
  880.     f8 = et.b(d2) * f10;
  881.     f9 = et.b(d3) * f10;
  882.     float f11 = (float)(d2 - et.b(d2));
  883.     float f12 = (float)(d3 - et.b(d3));
  884.  
  885.     int i3 = 8;
  886.  
  887.     int i4 = 4;
  888.     float f13 = 0.000976563F;
  889.     GL11.glScalef(f2, 1.0F, f2);
  890.     for (int i5 = 0; i5 < 2; i5++) {
  891.       if (i5 == 0) {
  892.         GL11.glColorMask(false, false, false, false);
  893.       }
  894.       else if (this.r.z.g) {
  895.         if (iv.b == 0) GL11.glColorMask(false, true, true, true); else
  896.           GL11.glColorMask(true, false, false, true);
  897.       }
  898.       else GL11.glColorMask(true, true, true, true);
  899.  
  900.       for (int i6 = -i4 + 1; i6 <= i4; i6++) {
  901.         for (int i7 = -i4 + 1; i7 <= i4; i7++) {
  902.           localxd.b();
  903.  
  904.           float f14 = i6 * i3;
  905.           float f15 = i7 * i3;
  906.           float f16 = f14 - f11;
  907.           float f17 = f15 - f12;
  908.  
  909.           if (f4 > -f3 - 1.0F) {
  910.             localxd.a(f5 * 0.7F, f6 * 0.7F, f7 * 0.7F, 0.8F);
  911.             localxd.b(0.0F, -1.0F, 0.0F);
  912.             localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i3, (f14 + 0.0F) * f10 + f8, (f15 + i3) * f10 + f9);
  913.             localxd.a(f16 + i3, f4 + 0.0F, f17 + i3, (f14 + i3) * f10 + f8, (f15 + i3) * f10 + f9);
  914.             localxd.a(f16 + i3, f4 + 0.0F, f17 + 0.0F, (f14 + i3) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  915.             localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  916.           }
  917.  
  918.           if (f4 <= f3 + 1.0F) {
  919.             localxd.a(f5, f6, f7, 0.8F);
  920.             localxd.b(0.0F, 1.0F, 0.0F);
  921.             localxd.a(f16 + 0.0F, f4 + f3 - f13, f17 + i3, (f14 + 0.0F) * f10 + f8, (f15 + i3) * f10 + f9);
  922.             localxd.a(f16 + i3, f4 + f3 - f13, f17 + i3, (f14 + i3) * f10 + f8, (f15 + i3) * f10 + f9);
  923.             localxd.a(f16 + i3, f4 + f3 - f13, f17 + 0.0F, (f14 + i3) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  924.             localxd.a(f16 + 0.0F, f4 + f3 - f13, f17 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  925.           }
  926.  
  927.           localxd.a(f5 * 0.9F, f6 * 0.9F, f7 * 0.9F, 0.8F);
  928.           int i8;
  929.           if (i6 > -1) {
  930.             localxd.b(-1.0F, 0.0F, 0.0F);
  931.             for (i8 = 0; i8 < i3; i8++) {
  932.               localxd.a(f16 + i8 + 0.0F, f4 + 0.0F, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
  933.               localxd.a(f16 + i8 + 0.0F, f4 + f3, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
  934.               localxd.a(f16 + i8 + 0.0F, f4 + f3, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  935.               localxd.a(f16 + i8 + 0.0F, f4 + 0.0F, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  936.             }
  937.           }
  938.  
  939.           if (i6 <= 1) {
  940.             localxd.b(1.0F, 0.0F, 0.0F);
  941.             for (i8 = 0; i8 < i3; i8++) {
  942.               localxd.a(f16 + i8 + 1.0F - f13, f4 + 0.0F, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
  943.               localxd.a(f16 + i8 + 1.0F - f13, f4 + f3, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
  944.               localxd.a(f16 + i8 + 1.0F - f13, f4 + f3, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  945.               localxd.a(f16 + i8 + 1.0F - f13, f4 + 0.0F, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
  946.             }
  947.           }
  948.  
  949.           localxd.a(f5 * 0.8F, f6 * 0.8F, f7 * 0.8F, 0.8F);
  950.           if (i7 > -1) {
  951.             localxd.b(0.0F, 0.0F, -1.0F);
  952.             for (i8 = 0; i8 < i3; i8++) {
  953.               localxd.a(f16 + 0.0F, f4 + f3, f17 + i8 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  954.               localxd.a(f16 + i3, f4 + f3, f17 + i8 + 0.0F, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  955.               localxd.a(f16 + i3, f4 + 0.0F, f17 + i8 + 0.0F, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  956.               localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i8 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  957.             }
  958.           }
  959.  
  960.           if (i7 <= 1) {
  961.             localxd.b(0.0F, 0.0F, 1.0F);
  962.             for (i8 = 0; i8 < i3; i8++) {
  963.               localxd.a(f16 + 0.0F, f4 + f3, f17 + i8 + 1.0F - f13, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  964.               localxd.a(f16 + i3, f4 + f3, f17 + i8 + 1.0F - f13, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  965.               localxd.a(f16 + i3, f4 + 0.0F, f17 + i8 + 1.0F - f13, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  966.               localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i8 + 1.0F - f13, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
  967.             }
  968.           }
  969.           localxd.a();
  970.         }
  971.       }
  972.     }
  973.  
  974.     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  975.     GL11.glDisable(3042);
  976.     GL11.glEnable(2884);
  977.   }
  978.  
  979.   public boolean a(wc paramwc, boolean paramBoolean)
  980.   {
  981.     int i1 = 0;
  982.  
  983.     if (i1 != 0) {
  984.       Collections.sort(this.k, new gp(paramwc));
  985.       i2 = this.k.size() - 1;
  986.       int i3 = this.k.size();
  987.       for (int i4 = 0; i4 < i3; i4++) {
  988.         localObject = (bv)this.k.get(i2 - i4);
  989.         if (!paramBoolean) {
  990.           if (((bv)localObject).a(paramwc) > 256.0F) {
  991.             if (((bv)localObject).o) {
  992.               if (i4 >= 3) return false;
  993.             }
  994.             else if (i4 >= 1) return false;
  995.           }
  996.         }
  997.         else
  998.           if (!((bv)localObject).o)
  999.             continue;
  1000.         ((bv)localObject).a();
  1001.         this.k.remove(localObject);
  1002.         ((bv)localObject).u = false;
  1003.       }
  1004.  
  1005.       return this.k.size() == 0;
  1006.     }
  1007.  
  1008.     int i2 = 2;
  1009.  
  1010.     gp localgp = new gp(paramwc);
  1011.     bv[] arrayOfbv = new bv[i2];
  1012.     Object localObject = null;
  1013.  
  1014.     int i5 = this.k.size();
  1015.     int i6 = 0;
  1016.     bv localbv1;
  1017.     for (int i7 = 0; i7 < i5; i7++) {
  1018.       localbv1 = (bv)this.k.get(i7);
  1019.  
  1020.       if (!paramBoolean) {
  1021.         if (localbv1.a(paramwc) > 256.0F)
  1022.         {
  1023.           for (int i9 = 0; (i9 < i2) && (
  1024.             (arrayOfbv[i9] == null) || (localgp.a(arrayOfbv[i9], localbv1) <= 0)); i9++);
  1025.           i9--;
  1026.  
  1027.           if (i9 <= 0) continue;
  1028.           i11 = i9;
  1029.           while (true) { i11--; if (i11 == 0) break;
  1030.             arrayOfbv[(i11 - 1)] = arrayOfbv[i11];
  1031.           }
  1032.           arrayOfbv[i9] = localbv1;
  1033.           continue;
  1034.         }
  1035.       }
  1036.       else {
  1037.         if (!localbv1.o)
  1038.         {
  1039.           continue;
  1040.         }
  1041.       }
  1042.  
  1043.       if (localObject == null) {
  1044.         localObject = new ArrayList();
  1045.       }
  1046.  
  1047.       i6++;
  1048.       ((ArrayList)localObject).add(localbv1);
  1049.       this.k.set(i7, null);
  1050.     }
  1051.  
  1052.     if (localObject != null) {
  1053.       if (((ArrayList)localObject).size() > 1) Collections.sort((List)localObject, localgp);
  1054.  
  1055.       for (i7 = ((ArrayList)localObject).size() - 1; i7 >= 0; i7--) {
  1056.         localbv1 = (bv)((ArrayList)localObject).get(i7);
  1057.         localbv1.a();
  1058.         localbv1.u = false;
  1059.       }
  1060.  
  1061.     }
  1062.  
  1063.     i7 = 0;
  1064.  
  1065.     for (int i8 = i2 - 1; i8 >= 0; i8--) {
  1066.       bv localbv2 = arrayOfbv[i8];
  1067.       if (localbv2 != null) {
  1068.         if ((!localbv2.o) && (i8 != i2 - 1))
  1069.         {
  1070.           arrayOfbv[i8] = null;
  1071.           arrayOfbv[0] = null;
  1072.           break;
  1073.         }
  1074.         arrayOfbv[i8].a();
  1075.         arrayOfbv[i8].u = false;
  1076.         i7++;
  1077.       }
  1078.  
  1079.     }
  1080.  
  1081.     i8 = 0;
  1082.     int i10 = 0;
  1083.     int i11 = this.k.size();
  1084.     while (i8 != i11) {
  1085.       bv localbv3 = (bv)this.k.get(i8);
  1086.       if (localbv3 != null) {
  1087.         int i12 = 0;
  1088.         for (int i13 = 0; (i13 < i2) && (i12 == 0); i13++) {
  1089.           if (localbv3 == arrayOfbv[i13]) {
  1090.             i12 = 1;
  1091.           }
  1092.         }
  1093.         if (i12 == 0) {
  1094.           if (i10 != i8) {
  1095.             this.k.set(i10, localbv3);
  1096.           }
  1097.           i10++;
  1098.         }
  1099.       }
  1100.       i8++;
  1101.     }
  1102.     while (true)
  1103.     {
  1104.       i8--; if (i8 < i10) break;
  1105.       this.k.remove(i8);
  1106.     }
  1107.  
  1108.     return i5 == i6 + i7;
  1109.   }
  1110.  
  1111.   public void a(sz paramsz, lz paramlz, int paramInt, ul paramul, float paramFloat)
  1112.   {
  1113.     xd localxd = xd.a;
  1114.     GL11.glEnable(3042);
  1115.     GL11.glEnable(3008);
  1116.     GL11.glBlendFunc(770, 1);
  1117.     GL11.glColor4f(1.0F, 1.0F, 1.0F, (et.a((float)System.currentTimeMillis() / 100.0F) * 0.2F + 0.4F) * 0.5F);
  1118.     int i2;
  1119.     if (paramInt == 0)
  1120.     {
  1121.       if (this.g > 0.0F) {
  1122.         GL11.glBlendFunc(774, 768);
  1123.  
  1124.         int i1 = this.j.b("/terrain.png");
  1125.         GL11.glBindTexture(3553, i1);
  1126.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
  1127.         GL11.glPushMatrix();
  1128.  
  1129.         i2 = this.i.a(paramlz.b, paramlz.c, paramlz.d);
  1130.         lq locallq = i2 > 0 ? lq.m[i2] : null;
  1131.         GL11.glDisable(3008);
  1132.  
  1133.         GL11.glPolygonOffset(-3.0F, -3.0F);
  1134.         GL11.glEnable(32823);
  1135.         double d1 = paramsz.N + (paramsz.o - paramsz.N) * paramFloat;
  1136.         double d2 = paramsz.O + (paramsz.p - paramsz.O) * paramFloat;
  1137.         double d3 = paramsz.P + (paramsz.q - paramsz.P) * paramFloat;
  1138.  
  1139.         if (locallq == null) locallq = lq.u;
  1140.         GL11.glEnable(3008);
  1141.         localxd.b();
  1142.         localxd.b(-d1, -d2, -d3);
  1143.         localxd.c();
  1144.         this.s.a(locallq, paramlz.b, paramlz.c, paramlz.d, 240 + (int)(this.g * 10.0F));
  1145.         localxd.a();
  1146.         localxd.b(0.0D, 0.0D, 0.0D);
  1147.         GL11.glDisable(3008);
  1148.  
  1149.         GL11.glPolygonOffset(0.0F, 0.0F);
  1150.         GL11.glDisable(32823);
  1151.         GL11.glEnable(3008);
  1152.  
  1153.         GL11.glDepthMask(true);
  1154.         GL11.glPopMatrix();
  1155.       }
  1156.     } else if (paramul != null) {
  1157.       GL11.glBlendFunc(770, 771);
  1158.       float f1 = et.a((float)System.currentTimeMillis() / 100.0F) * 0.2F + 0.8F;
  1159.       GL11.glColor4f(f1, f1, f1, et.a((float)System.currentTimeMillis() / 200.0F) * 0.2F + 0.5F);
  1160.  
  1161.       i2 = this.j.b("/terrain.png");
  1162.       GL11.glBindTexture(3553, i2);
  1163.       int i3 = paramlz.b;
  1164.       int i4 = paramlz.c;
  1165.       int i5 = paramlz.d;
  1166.       if (paramlz.e == 0) i4--;
  1167.       if (paramlz.e == 1) i4++;
  1168.       if (paramlz.e == 2) i5--;
  1169.       if (paramlz.e == 3) i5++;
  1170.       if (paramlz.e == 4) i3--;
  1171.       if (paramlz.e == 5) i3++;
  1172.  
  1173.     }
  1174.  
  1175.     GL11.glDisable(3042);
  1176.     GL11.glDisable(3008);
  1177.   }
  1178.  
  1179.   public void b(sz paramsz, lz paramlz, int paramInt, ul paramul, float paramFloat) {
  1180.     if ((paramInt == 0) && (paramlz.a == up.a)) {
  1181.       GL11.glEnable(3042);
  1182.       GL11.glBlendFunc(770, 771);
  1183.       GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
  1184.       GL11.glLineWidth(2.0F);
  1185.       GL11.glDisable(3553);
  1186.       GL11.glDepthMask(false);
  1187.       float f1 = 0.002F;
  1188.       int i1 = this.i.a(paramlz.b, paramlz.c, paramlz.d);
  1189.  
  1190.       if (i1 > 0) {
  1191.         lq.m[i1].a(this.i, paramlz.b, paramlz.c, paramlz.d);
  1192.         double d1 = paramsz.N + (paramsz.o - paramsz.N) * paramFloat;
  1193.         double d2 = paramsz.O + (paramsz.p - paramsz.O) * paramFloat;
  1194.         double d3 = paramsz.P + (paramsz.q - paramsz.P) * paramFloat;
  1195.         a(lq.m[i1].d(this.i, paramlz.b, paramlz.c, paramlz.d).b(f1, f1, f1).c(-d1, -d2, -d3));
  1196.       }
  1197.       GL11.glDepthMask(true);
  1198.       GL11.glEnable(3553);
  1199.       GL11.glDisable(3042);
  1200.     }
  1201.   }
  1202.  
  1203.   private void a(ro paramro) {
  1204.     xd localxd = xd.a;
  1205.  
  1206.     localxd.a(3);
  1207.     localxd.a(paramro.a, paramro.b, paramro.c);
  1208.     localxd.a(paramro.d, paramro.b, paramro.c);
  1209.     localxd.a(paramro.d, paramro.b, paramro.f);
  1210.     localxd.a(paramro.a, paramro.b, paramro.f);
  1211.     localxd.a(paramro.a, paramro.b, paramro.c);
  1212.     localxd.a();
  1213.  
  1214.     localxd.a(3);
  1215.     localxd.a(paramro.a, paramro.e, paramro.c);
  1216.     localxd.a(paramro.d, paramro.e, paramro.c);
  1217.     localxd.a(paramro.d, paramro.e, paramro.f);
  1218.     localxd.a(paramro.a, paramro.e, paramro.f);
  1219.     localxd.a(paramro.a, paramro.e, paramro.c);
  1220.     localxd.a();
  1221.  
  1222.     localxd.a(1);
  1223.     localxd.a(paramro.a, paramro.b, paramro.c);
  1224.     localxd.a(paramro.a, paramro.e, paramro.c);
  1225.     localxd.a(paramro.d, paramro.b, paramro.c);
  1226.     localxd.a(paramro.d, paramro.e, paramro.c);
  1227.     localxd.a(paramro.d, paramro.b, paramro.f);
  1228.     localxd.a(paramro.d, paramro.e, paramro.f);
  1229.     localxd.a(paramro.a, paramro.b, paramro.f);
  1230.     localxd.a(paramro.a, paramro.e, paramro.f);
  1231.     localxd.a();
  1232.   }
  1233.  
  1234.   public void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
  1235.     int i1 = et.a(paramInt1, 16);
  1236.     int i2 = et.a(paramInt2, 16);
  1237.     int i3 = et.a(paramInt3, 16);
  1238.     int i4 = et.a(paramInt4, 16);
  1239.     int i5 = et.a(paramInt5, 16);
  1240.     int i6 = et.a(paramInt6, 16);
  1241.  
  1242.     for (int i7 = i1; i7 <= i4; i7++) {
  1243.       int i8 = i7 % this.n;
  1244.       if (i8 < 0) i8 += this.n;
  1245.       for (int i9 = i2; i9 <= i5; i9++) {
  1246.         int i10 = i9 % this.o;
  1247.         if (i10 < 0) i10 += this.o;
  1248.         for (int i11 = i3; i11 <= i6; i11++) {
  1249.           int i12 = i11 % this.p;
  1250.           if (i12 < 0) i12 += this.p;
  1251.  
  1252.           int i13 = (i12 * this.o + i10) * this.n + i8;
  1253.           bv localbv = this.m[i13];
  1254.           if (!localbv.u) {
  1255.             this.k.add(localbv);
  1256.             localbv.f();
  1257.           }
  1258.         }
  1259.       }
  1260.     }
  1261.   }
  1262.  
  1263.   public void a(int paramInt1, int paramInt2, int paramInt3) {
  1264.     a(paramInt1 - 1, paramInt2 - 1, paramInt3 - 1, paramInt1 + 1, paramInt2 + 1, paramInt3 + 1);
  1265.   }
  1266.  
  1267.   public void b(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
  1268.     a(paramInt1 - 1, paramInt2 - 1, paramInt3 - 1, paramInt4 + 1, paramInt5 + 1, paramInt6 + 1);
  1269.   }
  1270.  
  1271.   public void a(adt paramadt, float paramFloat)
  1272.   {
  1273.     for (int i1 = 0; i1 < this.m.length; i1++) {
  1274.       if ((this.m[i1].e()) || (
  1275.         (this.m[i1].o) && ((i1 + this.h & 0xF) != 0))) continue;
  1276.       this.m[i1].a(paramadt);
  1277.     }
  1278.  
  1279.     this.h += 1;
  1280.   }
  1281.  
  1282.   public void a(String paramString, int paramInt1, int paramInt2, int paramInt3)
  1283.   {
  1284.     if (paramString != null) {
  1285.       this.r.v.b("C418 - " + paramString);
  1286.     }
  1287.     this.r.B.a(paramString, paramInt1, paramInt2, paramInt3, 1.0F, 1.0F);
  1288.   }
  1289.  
  1290.   public void a(String paramString, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) {
  1291.     float f1 = 16.0F;
  1292.     if (paramFloat1 > 1.0F) f1 *= paramFloat1;
  1293.     if (this.r.i.f(paramDouble1, paramDouble2, paramDouble3) < f1 * f1)
  1294.       this.r.B.b(paramString, (float)paramDouble1, (float)paramDouble2, (float)paramDouble3, paramFloat1, paramFloat2);
  1295.   }
  1296.  
  1297.   public void a(String paramString, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  1298.   {
  1299.     if ((this.r == null) || (this.r.i == null) || (this.r.j == null)) return;
  1300.     double d1 = this.r.i.o - paramDouble1;
  1301.     double d2 = this.r.i.p - paramDouble2;
  1302.     double d3 = this.r.i.q - paramDouble3;
  1303.  
  1304.     double d4 = 16.0D;
  1305.     if (paramString.equals("hugeexplosion")) this.r.j.a(new acv(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1306.     if (paramString.equals("largeexplode")) this.r.j.a(new gk(this.j, this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1307.  
  1308.     if (d1 * d1 + d2 * d2 + d3 * d3 > d4 * d4) return;
  1309.  
  1310.     if (paramString.equals("bubble")) { this.r.j.a(new qk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1311.     } else if (paramString.equals("suspended")) { this.r.j.a(new il(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1312.     } else if (paramString.equals("depthsuspend")) { this.r.j.a(new sk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1313.     } else if (paramString.equals("townaura")) { this.r.j.a(new sk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1314.     } else if (paramString.equals("crit")) { this.r.j.a(new oh(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1315.     } else if (paramString.equals("smoke")) { this.r.j.a(new ade(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1316.     } else if (paramString.equals("note")) { this.r.j.a(new v(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1317.     } else if (paramString.equals("portal")) { this.r.j.a(new xq(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1318.     } else if (paramString.equals("explode")) { this.r.j.a(new ta(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1319.     } else if (paramString.equals("flame")) { this.r.j.a(new jj(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1320.     } else if (paramString.equals("lava")) { this.r.j.a(new da(this.i, paramDouble1, paramDouble2, paramDouble3));
  1321.     } else if (paramString.equals("footstep")) { this.r.j.a(new st(this.j, this.i, paramDouble1, paramDouble2, paramDouble3));
  1322.     } else if (paramString.equals("splash")) { this.r.j.a(new kr(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1323.     } else if (paramString.equals("largesmoke")) { this.r.j.a(new ade(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, 2.5F));
  1324.     } else if (paramString.equals("cloud")) { this.r.j.a(new abm(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1325.     } else if (paramString.equals("reddust")) { this.r.j.a(new ub(this.i, paramDouble1, paramDouble2, paramDouble3, (float)paramDouble4, (float)paramDouble5, (float)paramDouble6));
  1326.     } else if (paramString.equals("snowballpoof")) { this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, su.aE));
  1327.     } else if (paramString.equals("snowshovel")) { this.r.j.a(new hd(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1328.     } else if (paramString.equals("slime")) { this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, su.aN));
  1329.     } else if (paramString.equals("heart")) { this.r.j.a(new vf(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
  1330.     }
  1331.     else
  1332.     {
  1333.       int i1;
  1334.       if (paramString.startsWith("iconcrack_")) {
  1335.         i1 = Integer.parseInt(paramString.substring(paramString.indexOf("_") + 1));
  1336.         this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, su.f[i1]));
  1337.       } else if (paramString.startsWith("tilecrack_")) {
  1338.         i1 = Integer.parseInt(paramString.substring(paramString.indexOf("_") + 1));
  1339.         this.r.j.a(new jc(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, lq.m[i1], 0, 0));
  1340.       }
  1341.     }
  1342.   }
  1343.  
  1344.   public void a(ki paramki)
  1345.   {
  1346.     paramki.K();
  1347.     if (paramki.ac != null) this.j.a(paramki.ac, new jv());
  1348.     if (paramki.ad != null) this.j.a(paramki.ad, new jv());
  1349.   }
  1350.  
  1351.   public void b(ki paramki)
  1352.   {
  1353.     if (paramki.ac != null) this.j.c(paramki.ac);
  1354.     if (paramki.ad != null) this.j.c(paramki.ad);
  1355.   }
  1356.  
  1357.   public void a(int paramInt1, int paramInt2, int paramInt3, ij paramij)
  1358.   {
  1359.   }
  1360.  
  1361.   public void e() {
  1362.     dl.b(this.q);
  1363.   }
  1364.  
  1365.   public void a(sz paramsz, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5) {
  1366.     Random localRandom = this.i.w;
  1367.     int i3;
  1368.     switch (paramInt1) {
  1369.     case 1001:
  1370.       this.i.a(paramInt2, paramInt3, paramInt4, "random.click", 1.0F, 1.2F);
  1371.       break;
  1372.     case 1000:
  1373.       this.i.a(paramInt2, paramInt3, paramInt4, "random.click", 1.0F, 1.0F);
  1374.       break;
  1375.     case 1002:
  1376.       this.i.a(paramInt2, paramInt3, paramInt4, "random.bow", 1.0F, 1.2F);
  1377.       break;
  1378.     case 2000:
  1379.       int i1 = paramInt5 % 3 - 1;
  1380.       int i2 = paramInt5 / 3 % 3 - 1;
  1381.       double d1 = paramInt2 + i1 * 0.6D + 0.5D;
  1382.       double d2 = paramInt3 + 0.5D;
  1383.       double d3 = paramInt4 + i2 * 0.6D + 0.5D;
  1384.       for (i3 = 0; i3 < 10; i3++) {
  1385.         double d4 = localRandom.nextDouble() * 0.2D + 0.01D;
  1386.         double d5 = d1 + i1 * 0.01D + (localRandom.nextDouble() - 0.5D) * i2 * 0.5D;
  1387.         double d6 = d2 + (localRandom.nextDouble() - 0.5D) * 0.5D;
  1388.         double d7 = d3 + i2 * 0.01D + (localRandom.nextDouble() - 0.5D) * i1 * 0.5D;
  1389.         double d8 = i1 * d4 + localRandom.nextGaussian() * 0.01D;
  1390.         double d9 = -0.03D + localRandom.nextGaussian() * 0.01D;
  1391.         double d10 = i2 * d4 + localRandom.nextGaussian() * 0.01D;
  1392.         a("smoke", d5, d6, d7, d8, d9, d10);
  1393.       }
  1394.       break;
  1395.     case 2001:
  1396.       i3 = paramInt5 & 0xFF;
  1397.       if (i3 > 0) {
  1398.         lq locallq = lq.m[i3];
  1399.         this.r.B.b(locallq.bL.a(), paramInt2 + 0.5F, paramInt3 + 0.5F, paramInt4 + 0.5F, (locallq.bL.b() + 1.0F) / 2.0F, locallq.bL.c() * 0.8F);
  1400.       }
  1401.       this.r.j.a(paramInt2, paramInt3, paramInt4, paramInt5 & 0xFF, paramInt5 >> 8 & 0xFF);
  1402.       break;
  1403.     case 1003:
  1404.       if (Math.random() < 0.5D)
  1405.         this.i.a(paramInt2 + 0.5D, paramInt3 + 0.5D, paramInt4 + 0.5D, "random.door_open", 1.0F, this.i.w.nextFloat() * 0.1F + 0.9F);
  1406.       else {
  1407.         this.i.a(paramInt2 + 0.5D, paramInt3 + 0.5D, paramInt4 + 0.5D, "random.door_close", 1.0F, this.i.w.nextFloat() * 0.1F + 0.9F);
  1408.       }
  1409.       break;
  1410.     case 1004:
  1411.       this.i.a(paramInt2 + 0.5F, paramInt3 + 0.5F, paramInt4 + 0.5F, "random.fizz", 0.5F, 2.6F + (localRandom.nextFloat() - localRandom.nextFloat()) * 0.8F);
  1412.       break;
  1413.     case 1005:
  1414.       if ((su.f[paramInt5] instanceof aat))
  1415.         this.i.a(((aat)su.f[paramInt5]).a, paramInt2, paramInt3, paramInt4);
  1416.       else
  1417.         this.i.a(null, paramInt2, paramInt3, paramInt4);
  1418.     }
  1419.   }
  1420. }
Add Comment
Please, Sign In to add comment