Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.nio.IntBuffer;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.Collections;
- import java.util.List;
- import java.util.Random;
- import net.minecraft.client.Minecraft;
- import org.lwjgl.opengl.ARBOcclusionQuery;
- import org.lwjgl.opengl.GL11;
- public class i
- implements yi
- {
- public List a = new ArrayList();
- private ru i;
- private ur j;
- private List k = new ArrayList();
- private bv[] l;
- private bv[] m;
- private int n;
- private int o;
- private int p;
- private int q;
- private Minecraft r;
- private qn s;
- private IntBuffer t;
- private boolean u = false;
- private int v = 0;
- private int w;
- private int x;
- private int y;
- private int z;
- private int A;
- private int B;
- private int C;
- private int D;
- private int E;
- private int F = -1;
- private int G = 2;
- private int H;
- private int I;
- private int J;
- int[] b = new int[50000];
- IntBuffer c = dl.d(64);
- private int K;
- private int L;
- private int M;
- private int N;
- private int O;
- private int P;
- private List Q = new ArrayList();
- private kv[] R = { new kv(), new kv(), new kv(), new kv() };
- double d = -9999.0D;
- double e = -9999.0D;
- double f = -9999.0D;
- public float g;
- int h = 0;
- public i(Minecraft paramMinecraft, ur paramur)
- {
- this.r = paramMinecraft;
- this.j = paramur;
- int i1 = 64;
- this.q = dl.a(i1 * i1 * i1 * 3);
- this.u = paramMinecraft.n().a();
- if (this.u) {
- this.c.clear();
- this.t = dl.d(i1 * i1 * i1);
- this.t.clear();
- this.t.position(0);
- this.t.limit(i1 * i1 * i1);
- ARBOcclusionQuery.glGenQueriesARB(this.t);
- }
- this.w = dl.a(3);
- GL11.glPushMatrix();
- GL11.glNewList(this.w, 4864);
- f();
- GL11.glEndList();
- GL11.glPopMatrix();
- xd localxd = xd.a;
- this.x = (this.w + 1);
- GL11.glNewList(this.x, 4864);
- int i2 = 64;
- int i3 = 256 / i2 + 2;
- float f1 = 16.0F;
- int i5;
- for (int i4 = -i2 * i3; i4 <= i2 * i3; i4 += i2) {
- for (i5 = -i2 * i3; i5 <= i2 * i3; i5 += i2) {
- localxd.b();
- localxd.a(i4 + 0, f1, i5 + 0);
- localxd.a(i4 + i2, f1, i5 + 0);
- localxd.a(i4 + i2, f1, i5 + i2);
- localxd.a(i4 + 0, f1, i5 + i2);
- localxd.a();
- }
- }
- GL11.glEndList();
- this.y = (this.w + 2);
- GL11.glNewList(this.y, 4864);
- f1 = -16.0F;
- localxd.b();
- for (i4 = -i2 * i3; i4 <= i2 * i3; i4 += i2) {
- for (i5 = -i2 * i3; i5 <= i2 * i3; i5 += i2) {
- localxd.a(i4 + i2, f1, i5 + 0);
- localxd.a(i4 + 0, f1, i5 + 0);
- localxd.a(i4 + 0, f1, i5 + i2);
- localxd.a(i4 + i2, f1, i5 + i2);
- }
- }
- localxd.a();
- GL11.glEndList();
- }
- private void f() {
- Random localRandom = new Random(10842L);
- xd localxd = xd.a;
- localxd.b();
- for (int i1 = 0; i1 < 1500; i1++) {
- double d1 = localRandom.nextFloat() * 2.0F - 1.0F;
- double d2 = localRandom.nextFloat() * 2.0F - 1.0F;
- double d3 = localRandom.nextFloat() * 2.0F - 1.0F;
- double d4 = 0.25F + localRandom.nextFloat() * 0.25F;
- double d5 = d1 * d1 + d2 * d2 + d3 * d3;
- if ((d5 < 1.0D) && (d5 > 0.01D)) {
- d5 = 1.0D / Math.sqrt(d5);
- d1 *= d5;
- d2 *= d5;
- d3 *= d5;
- double d6 = d1 * 100.0D;
- double d7 = d2 * 100.0D;
- double d8 = d3 * 100.0D;
- double d9 = Math.atan2(d1, d3);
- double d10 = Math.sin(d9);
- double d11 = Math.cos(d9);
- double d12 = Math.atan2(Math.sqrt(d1 * d1 + d3 * d3), d2);
- double d13 = Math.sin(d12);
- double d14 = Math.cos(d12);
- double d15 = localRandom.nextDouble() * 3.141592653589793D * 2.0D;
- double d16 = Math.sin(d15);
- double d17 = Math.cos(d15);
- for (int i2 = 0; i2 < 4; i2++) {
- double d18 = 0.0D;
- double d19 = ((i2 & 0x2) - 1) * d4;
- double d20 = ((i2 + 1 & 0x2) - 1) * d4;
- double d21 = d18;
- double d22 = d19 * d17 - d20 * d16;
- double d23 = d20 * d17 + d19 * d16;
- double d24 = d23;
- double d25 = d22 * d13 + d21 * d14;
- double d26 = d21 * d13 - d22 * d14;
- double d27 = d26 * d10 - d24 * d11;
- double d28 = d25;
- double d29 = d24 * d10 + d26 * d11;
- localxd.a(d6 + d27, d7 + d28, d8 + d29);
- }
- }
- }
- localxd.a();
- }
- public void a(ru paramru) {
- if (this.i != null) {
- this.i.b(this);
- }
- this.d = -9999.0D;
- this.e = -9999.0D;
- this.f = -9999.0D;
- aal.a.a(paramru);
- this.i = paramru;
- this.s = new qn(paramru);
- if (paramru != null) {
- paramru.a(this);
- a();
- }
- }
- public void a()
- {
- lq.L.b(this.r.z.j);
- this.F = this.r.z.e;
- if (this.m != null) {
- for (i1 = 0; i1 < this.m.length; i1++) {
- this.m[i1].c();
- }
- }
- int i1 = 64 << 3 - this.F;
- if (i1 > 400) i1 = 400;
- this.n = (i1 / 16 + 1);
- this.i.getClass(); this.o = ('' / 16);
- this.p = (i1 / 16 + 1);
- this.m = new bv[this.n * this.o * this.p];
- this.l = new bv[this.n * this.o * this.p];
- int i2 = 0;
- int i3 = 0;
- this.z = 0;
- this.A = 0;
- this.B = 0;
- this.C = this.n;
- this.D = this.o;
- this.E = this.p;
- for (int i4 = 0; i4 < this.k.size(); i4++) {
- ((bv)this.k.get(i4)).u = false;
- }
- this.k.clear();
- this.a.clear();
- for (i4 = 0; i4 < this.n; i4++) {
- for (int i5 = 0; i5 < this.o; i5++) {
- for (int i6 = 0; i6 < this.p; i6++) {
- 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);
- if (this.u) {
- this.m[((i6 * this.o + i5) * this.n + i4)].z = this.t.get(i3);
- }
- this.m[((i6 * this.o + i5) * this.n + i4)].y = false;
- this.m[((i6 * this.o + i5) * this.n + i4)].x = true;
- this.m[((i6 * this.o + i5) * this.n + i4)].o = true;
- this.m[((i6 * this.o + i5) * this.n + i4)].w = (i3++);
- this.m[((i6 * this.o + i5) * this.n + i4)].f();
- this.l[((i6 * this.o + i5) * this.n + i4)] = this.m[((i6 * this.o + i5) * this.n + i4)];
- this.k.add(this.m[((i6 * this.o + i5) * this.n + i4)]);
- i2 += 3;
- }
- }
- }
- if (this.i != null) {
- wc localwc = this.r.i;
- if (localwc != null) {
- b(et.b(localwc.o), et.b(localwc.p), et.b(localwc.q));
- Arrays.sort(this.l, new fe(localwc));
- }
- }
- this.G = 2;
- }
- public void a(ax paramax, adt paramadt, float paramFloat)
- {
- if (this.G > 0) {
- this.G -= 1;
- return;
- }
- vw.a.a(this.i, this.j, this.r.q, this.r.i, paramFloat);
- aal.a.a(this.i, this.j, this.r.q, this.r.i, this.r.z, paramFloat);
- this.H = 0;
- this.I = 0;
- this.J = 0;
- wc localwc = this.r.i;
- aal.b = localwc.N + (localwc.o - localwc.N) * paramFloat;
- aal.c = localwc.O + (localwc.p - localwc.O) * paramFloat;
- aal.d = localwc.P + (localwc.q - localwc.P) * paramFloat;
- vw.b = localwc.N + (localwc.o - localwc.N) * paramFloat;
- vw.c = localwc.O + (localwc.p - localwc.O) * paramFloat;
- vw.d = localwc.P + (localwc.q - localwc.P) * paramFloat;
- this.r.t.b(paramFloat);
- List localList = this.i.p();
- this.H = localList.size();
- ki localki;
- for (int i1 = 0; i1 < this.i.j.size(); i1++) {
- localki = (ki)this.i.j.get(i1);
- this.I += 1;
- if (!localki.a(paramax)) continue; aal.a.a(localki, paramFloat);
- }
- for (i1 = 0; i1 < localList.size(); i1++) {
- localki = (ki)localList.get(i1);
- if ((!localki.a(paramax)) || ((!localki.an) && (!paramadt.a(localki.y))) || (
- (localki == this.r.i) && (!this.r.z.C) && (!this.r.i.ah()))) continue;
- int i2 = et.b(localki.p);
- if (i2 < 0) i2 = 0;
- this.i.getClass(); if (i2 >= 128) { this.i.getClass(); i2 = '' - 1; }
- if (!this.i.d(et.b(localki.o), i2, et.b(localki.q))) {
- continue;
- }
- this.I += 1;
- aal.a.a(localki, paramFloat);
- }
- ov.b();
- for (i1 = 0; i1 < this.a.size(); i1++) {
- vw.a.a((ij)this.a.get(i1), paramFloat);
- }
- this.r.t.a(paramFloat);
- }
- public String b() {
- return "C: " + this.N + "/" + this.K + ". F: " + this.L + ", O: " + this.M + ", E: " + this.O;
- }
- public String c() {
- return "E: " + this.I + "/" + this.H + ". B: " + this.J + ", I: " + (this.H - this.J - this.I);
- }
- private void b(int paramInt1, int paramInt2, int paramInt3)
- {
- paramInt1 -= 8;
- paramInt2 -= 8;
- paramInt3 -= 8;
- this.z = 2147483647;
- this.A = 2147483647;
- this.B = 2147483647;
- this.C = -2147483648;
- this.D = -2147483648;
- this.E = -2147483648;
- int i1 = this.n * 16;
- int i2 = i1 / 2;
- for (int i3 = 0; i3 < this.n; i3++) {
- int i4 = i3 * 16;
- int i5 = i4 + i2 - paramInt1;
- if (i5 < 0) i5 -= i1 - 1;
- i5 /= i1;
- i4 -= i5 * i1;
- if (i4 < this.z) this.z = i4;
- if (i4 > this.C) this.C = i4;
- for (int i6 = 0; i6 < this.p; i6++) {
- int i7 = i6 * 16;
- int i8 = i7 + i2 - paramInt3;
- if (i8 < 0) i8 -= i1 - 1;
- i8 /= i1;
- i7 -= i8 * i1;
- if (i7 < this.B) this.B = i7;
- if (i7 > this.E) this.E = i7;
- for (int i9 = 0; i9 < this.o; i9++) {
- int i10 = i9 * 16;
- if (i10 < this.A) this.A = i10;
- if (i10 > this.D) this.D = i10;
- bv localbv = this.m[((i6 * this.o + i9) * this.n + i3)];
- boolean bool = localbv.u;
- localbv.a(i4, i10, i7);
- if ((!bool) && (localbv.u))
- this.k.add(localbv);
- }
- }
- }
- }
- public int a(wc paramwc, int paramInt, double paramDouble)
- {
- for (int i1 = 0; i1 < 10; i1++) {
- this.P = ((this.P + 1) % this.m.length);
- bv localbv1 = this.m[this.P];
- if ((localbv1.u) && (!this.k.contains(localbv1))) {
- this.k.add(localbv1);
- }
- }
- if (this.r.z.e != this.F) {
- a();
- }
- if (paramInt == 0) {
- this.K = 0;
- this.L = 0;
- this.M = 0;
- this.N = 0;
- this.O = 0;
- }
- double d1 = paramwc.N + (paramwc.o - paramwc.N) * paramDouble;
- double d2 = paramwc.O + (paramwc.p - paramwc.O) * paramDouble;
- double d3 = paramwc.P + (paramwc.q - paramwc.P) * paramDouble;
- double d4 = paramwc.o - this.d;
- double d5 = paramwc.p - this.e;
- double d6 = paramwc.q - this.f;
- if (d4 * d4 + d5 * d5 + d6 * d6 > 16.0D) {
- this.d = paramwc.o;
- this.e = paramwc.p;
- this.f = paramwc.q;
- b(et.b(paramwc.o), et.b(paramwc.p), et.b(paramwc.q));
- Arrays.sort(this.l, new fe(paramwc));
- }
- ov.a();
- int i2 = 0;
- if ((this.u) && (this.r.z.h) && (!this.r.z.g) && (paramInt == 0)) {
- int i3 = 0;
- int i4 = 16;
- a(i3, i4);
- for (int i5 = i3; i5 < i4; i5++) {
- this.l[i5].x = true;
- }
- i2 += a(i3, i4, paramInt, paramDouble);
- do
- {
- i3 = i4;
- i4 *= 2;
- if (i4 > this.l.length) i4 = this.l.length;
- GL11.glDisable(3553);
- GL11.glDisable(2896);
- GL11.glDisable(3008);
- GL11.glDisable(2912);
- GL11.glColorMask(false, false, false, false);
- GL11.glDepthMask(false);
- a(i3, i4);
- GL11.glPushMatrix();
- float f1 = 0.0F;
- float f2 = 0.0F;
- float f3 = 0.0F;
- for (int i6 = i3; i6 < i4; i6++)
- if (this.l[i6].e()) {
- this.l[i6].o = false;
- }
- else {
- if (!this.l[i6].o) {
- this.l[i6].x = true;
- }
- if ((this.l[i6].o) && (!this.l[i6].y)) {
- float f4 = et.c(this.l[i6].a(paramwc));
- int i7 = (int)(1.0F + f4 / 128.0F);
- if (this.v % i7 == i6 % i7) {
- bv localbv2 = this.l[i6];
- float f5 = (float)(localbv2.i - d1);
- float f6 = (float)(localbv2.j - d2);
- float f7 = (float)(localbv2.k - d3);
- float f8 = f5 - f1;
- float f9 = f6 - f2;
- float f10 = f7 - f3;
- if ((f8 != 0.0F) || (f9 != 0.0F) || (f10 != 0.0F)) {
- GL11.glTranslatef(f8, f9, f10);
- f1 += f8;
- f2 += f9;
- f3 += f10;
- }
- ARBOcclusionQuery.glBeginQueryARB(35092, this.l[i6].z);
- this.l[i6].d();
- ARBOcclusionQuery.glEndQueryARB(35092);
- this.l[i6].y = true;
- }
- }
- }
- GL11.glPopMatrix();
- if (this.r.z.g) {
- if (iv.b == 0) GL11.glColorMask(false, true, true, true); else
- GL11.glColorMask(true, false, false, true);
- }
- else GL11.glColorMask(true, true, true, true);
- GL11.glDepthMask(true);
- GL11.glEnable(3553);
- GL11.glEnable(3008);
- GL11.glEnable(2912);
- i2 += a(i3, i4, paramInt, paramDouble);
- }
- while (i4 < this.l.length);
- }
- else {
- i2 += a(0, this.l.length, paramInt, paramDouble);
- }
- return i2;
- }
- private void a(int paramInt1, int paramInt2) {
- for (int i1 = paramInt1; i1 < paramInt2; i1++)
- if (this.l[i1].y) {
- this.c.clear();
- ARBOcclusionQuery.glGetQueryObjectuARB(this.l[i1].z, 34919, this.c);
- if (this.c.get(0) != 0) {
- this.l[i1].y = false;
- this.c.clear();
- ARBOcclusionQuery.glGetQueryObjectuARB(this.l[i1].z, 34918, this.c);
- this.l[i1].x = (this.c.get(0) != 0);
- }
- }
- }
- private int a(int paramInt1, int paramInt2, int paramInt3, double paramDouble)
- {
- this.Q.clear();
- int i1 = 0;
- for (int i2 = paramInt1; i2 < paramInt2; i2++) {
- if (paramInt3 == 0) {
- this.K += 1;
- if (this.l[i2].p[paramInt3] != 0) this.O += 1;
- else if (!this.l[i2].o) this.L += 1;
- else if ((this.u) && (!this.l[i2].x)) this.M += 1; else {
- this.N += 1;
- }
- }
- if ((this.l[i2].p[paramInt3] == 0) && (this.l[i2].o) && ((!this.u) || (this.l[i2].x))) {
- int i3 = this.l[i2].a(paramInt3);
- if (i3 >= 0) {
- this.Q.add(this.l[i2]);
- i1++;
- }
- }
- }
- wc localwc = this.r.i;
- double d1 = localwc.N + (localwc.o - localwc.N) * paramDouble;
- double d2 = localwc.O + (localwc.p - localwc.O) * paramDouble;
- double d3 = localwc.P + (localwc.q - localwc.P) * paramDouble;
- int i4 = 0;
- for (int i5 = 0; i5 < this.R.length; i5++) {
- this.R[i5].b();
- }
- for (i5 = 0; i5 < this.Q.size(); i5++) {
- bv localbv = (bv)this.Q.get(i5);
- int i6 = -1;
- for (int i7 = 0; i7 < i4; i7++) {
- if (this.R[i7].a(localbv.i, localbv.j, localbv.k)) {
- i6 = i7;
- }
- }
- if (i6 < 0) {
- i6 = i4++;
- this.R[i6].a(localbv.i, localbv.j, localbv.k, d1, d2, d3);
- }
- this.R[i6].a(localbv.a(paramInt3));
- }
- a(paramInt3, paramDouble);
- return i1;
- }
- public void a(int paramInt, double paramDouble)
- {
- this.r.t.b(paramDouble);
- for (int i1 = 0; i1 < this.R.length; i1++) {
- this.R[i1].a();
- }
- this.r.t.a(paramDouble);
- }
- public void d() {
- this.v += 1;
- }
- public void a(float paramFloat) {
- if (this.r.f.y.c) return;
- GL11.glDisable(3553);
- ax localax = this.i.a(this.r.i, paramFloat);
- float f1 = (float)localax.a;
- float f2 = (float)localax.b;
- float f3 = (float)localax.c;
- if (this.r.z.g) {
- float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
- float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
- f7 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
- f1 = f4;
- f2 = f5;
- f3 = f7;
- }
- GL11.glColor3f(f1, f2, f3);
- xd localxd = xd.a;
- GL11.glDepthMask(false);
- GL11.glEnable(2912);
- GL11.glColor3f(f1, f2, f3);
- GL11.glCallList(this.x);
- GL11.glDisable(2912);
- GL11.glDisable(3008);
- GL11.glEnable(3042);
- GL11.glBlendFunc(770, 771);
- ov.a();
- float[] arrayOfFloat = this.i.y.a(this.i.c(paramFloat), paramFloat);
- if (arrayOfFloat != null) {
- GL11.glDisable(3553);
- GL11.glShadeModel(7425);
- GL11.glPushMatrix();
- GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(et.a(this.i.d(paramFloat)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
- f7 = arrayOfFloat[0];
- f8 = arrayOfFloat[1];
- f9 = arrayOfFloat[2];
- float f14;
- if (this.r.z.g) {
- float f10 = (f7 * 30.0F + f8 * 59.0F + f9 * 11.0F) / 100.0F;
- float f12 = (f7 * 30.0F + f8 * 70.0F) / 100.0F;
- f14 = (f7 * 30.0F + f9 * 70.0F) / 100.0F;
- f7 = f10;
- f8 = f12;
- f9 = f14;
- }
- localxd.a(6);
- localxd.a(f7, f8, f9, arrayOfFloat[3]);
- localxd.a(0.0D, 100.0D, 0.0D);
- int i1 = 16;
- localxd.a(arrayOfFloat[0], arrayOfFloat[1], arrayOfFloat[2], 0.0F);
- for (int i2 = 0; i2 <= i1; i2++) {
- f14 = i2 * 3.141593F * 2.0F / i1;
- float f15 = et.a(f14);
- float f16 = et.b(f14);
- localxd.a(f15 * 120.0F, f16 * 120.0F, -f16 * 40.0F * arrayOfFloat[3]);
- }
- localxd.a();
- GL11.glPopMatrix();
- GL11.glShadeModel(7424);
- }
- GL11.glEnable(3553);
- GL11.glBlendFunc(770, 1);
- GL11.glPushMatrix();
- float f6 = 1.0F - this.i.i(paramFloat);
- float f7 = 0.0F;
- float f8 = 0.0F;
- float f9 = 0.0F;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, f6);
- GL11.glTranslatef(f7, f8, f9);
- GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(this.i.c(paramFloat) * 360.0F, 1.0F, 0.0F, 0.0F);
- float f11 = 30.0F;
- GL11.glBindTexture(3553, this.j.b("/terrain/sun.png"));
- localxd.b();
- localxd.a(-f11, 100.0D, -f11, 0.0D, 0.0D);
- localxd.a(f11, 100.0D, -f11, 1.0D, 0.0D);
- localxd.a(f11, 100.0D, f11, 1.0D, 1.0D);
- localxd.a(-f11, 100.0D, f11, 0.0D, 1.0D);
- localxd.a();
- f11 = 20.0F;
- GL11.glBindTexture(3553, this.j.b("/terrain/moon.png"));
- localxd.b();
- localxd.a(-f11, -100.0D, f11, 1.0D, 1.0D);
- localxd.a(f11, -100.0D, f11, 0.0D, 1.0D);
- localxd.a(f11, -100.0D, -f11, 0.0D, 0.0D);
- localxd.a(-f11, -100.0D, -f11, 1.0D, 0.0D);
- localxd.a();
- GL11.glDisable(3553);
- float f13 = this.i.g(paramFloat) * f6;
- if (f13 > 0.0F) {
- GL11.glColor4f(f13, f13, f13, f13);
- GL11.glCallList(this.w);
- }
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glDisable(3042);
- GL11.glEnable(3008);
- GL11.glEnable(2912);
- GL11.glPopMatrix();
- GL11.glDisable(3553);
- GL11.glColor3f(0.0F, 0.0F, 0.0F);
- double d1 = this.r.h.g(paramFloat).b - 64.0D;
- if (d1 < 0.0D) {
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 12.0F, 0.0F);
- GL11.glCallList(this.y);
- GL11.glPopMatrix();
- f8 = 1.0F;
- f9 = -(float)(d1 + 64.0D);
- f11 = -f8;
- f13 = f9;
- localxd.b();
- localxd.a(0, 255);
- localxd.a(-f8, f13, f8);
- localxd.a(f8, f13, f8);
- localxd.a(f8, f11, f8);
- localxd.a(-f8, f11, f8);
- localxd.a(-f8, f11, -f8);
- localxd.a(f8, f11, -f8);
- localxd.a(f8, f13, -f8);
- localxd.a(-f8, f13, -f8);
- localxd.a(f8, f11, -f8);
- localxd.a(f8, f11, f8);
- localxd.a(f8, f13, f8);
- localxd.a(f8, f13, -f8);
- localxd.a(-f8, f13, -f8);
- localxd.a(-f8, f13, f8);
- localxd.a(-f8, f11, f8);
- localxd.a(-f8, f11, -f8);
- localxd.a(-f8, f11, -f8);
- localxd.a(-f8, f11, f8);
- localxd.a(f8, f11, f8);
- localxd.a(f8, f11, -f8);
- localxd.a();
- }
- if (this.i.y.c())
- GL11.glColor3f(f1 * 0.2F + 0.04F, f2 * 0.2F + 0.04F, f3 * 0.6F + 0.1F);
- else {
- GL11.glColor3f(f1, f2, f3);
- }
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, -(float)(d1 - 16.0D), 0.0F);
- GL11.glCallList(this.y);
- GL11.glPopMatrix();
- GL11.glEnable(3553);
- GL11.glDepthMask(true);
- }
- public void b(float paramFloat)
- {
- if (this.r.f.y.c) return;
- if (this.r.z.j) {
- c(paramFloat);
- return;
- }
- GL11.glDisable(2884);
- float f1 = (float)(this.r.i.O + (this.r.i.p - this.r.i.O) * paramFloat);
- int i1 = 32;
- int i2 = 256 / i1;
- xd localxd = xd.a;
- GL11.glBindTexture(3553, this.j.b("/environment/clouds.png"));
- GL11.glEnable(3042);
- GL11.glBlendFunc(770, 771);
- ax localax = this.i.e(paramFloat);
- float f2 = (float)localax.a;
- float f3 = (float)localax.b;
- float f4 = (float)localax.c;
- if (this.r.z.g) {
- f5 = (f2 * 30.0F + f3 * 59.0F + f4 * 11.0F) / 100.0F;
- float f6 = (f2 * 30.0F + f3 * 70.0F) / 100.0F;
- float f7 = (f2 * 30.0F + f4 * 70.0F) / 100.0F;
- f2 = f5;
- f3 = f6;
- f4 = f7;
- }
- float f5 = 0.0004882813F;
- double d1 = this.v + paramFloat + (this.i.J + (this.i.K - this.i.J) * paramFloat) * 24000.0D;
- double d2 = this.r.i.l + (this.r.i.o - this.r.i.l) * paramFloat + d1 * 0.02999999932944775D;
- double d3 = this.r.i.n + (this.r.i.q - this.r.i.n) * paramFloat;
- int i3 = et.b(d2 / 2048.0D);
- int i4 = et.b(d3 / 2048.0D);
- d2 -= i3 * 2048;
- d3 -= i4 * 2048;
- float f8 = this.i.y.d() - f1 + 0.33F;
- float f9 = (float)(d2 * f5);
- float f10 = (float)(d3 * f5);
- localxd.b();
- localxd.a(f2, f3, f4, 0.8F);
- for (int i5 = -i1 * i2; i5 < i1 * i2; i5 += i1) {
- for (int i6 = -i1 * i2; i6 < i1 * i2; i6 += i1) {
- localxd.a(i5 + 0, f8, i6 + i1, (i5 + 0) * f5 + f9, (i6 + i1) * f5 + f10);
- localxd.a(i5 + i1, f8, i6 + i1, (i5 + i1) * f5 + f9, (i6 + i1) * f5 + f10);
- localxd.a(i5 + i1, f8, i6 + 0, (i5 + i1) * f5 + f9, (i6 + 0) * f5 + f10);
- localxd.a(i5 + 0, f8, i6 + 0, (i5 + 0) * f5 + f9, (i6 + 0) * f5 + f10);
- }
- }
- localxd.a();
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glDisable(3042);
- GL11.glEnable(2884);
- }
- public boolean a(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat)
- {
- return false;
- }
- public void c(float paramFloat) {
- GL11.glDisable(2884);
- float f1 = (float)(this.r.i.O + (this.r.i.p - this.r.i.O) * paramFloat);
- xd localxd = xd.a;
- float f2 = 12.0F;
- float f3 = 4.0F;
- double d1 = this.v + paramFloat + (this.i.J + (this.i.K - this.i.J) * paramFloat) * 24000.0D;
- double d2 = (this.r.i.l + (this.r.i.o - this.r.i.l) * paramFloat + d1 * 0.02999999932944775D) / f2;
- double d3 = (this.r.i.n + (this.r.i.q - this.r.i.n) * paramFloat) / f2 + 0.3300000131130219D;
- float f4 = this.i.y.d() - f1 + 0.33F;
- int i1 = et.b(d2 / 2048.0D);
- int i2 = et.b(d3 / 2048.0D);
- d2 -= i1 * 2048;
- d3 -= i2 * 2048;
- GL11.glBindTexture(3553, this.j.b("/environment/clouds.png"));
- GL11.glEnable(3042);
- GL11.glBlendFunc(770, 771);
- ax localax = this.i.e(paramFloat);
- float f5 = (float)localax.a;
- float f6 = (float)localax.b;
- float f7 = (float)localax.c;
- if (this.r.z.g) {
- f8 = (f5 * 30.0F + f6 * 59.0F + f7 * 11.0F) / 100.0F;
- f9 = (f5 * 30.0F + f6 * 70.0F) / 100.0F;
- f10 = (f5 * 30.0F + f7 * 70.0F) / 100.0F;
- f5 = f8;
- f6 = f9;
- f7 = f10;
- }
- float f8 = (float)(d2 * 0.0D);
- float f9 = (float)(d3 * 0.0D);
- float f10 = 0.0039063F;
- f8 = et.b(d2) * f10;
- f9 = et.b(d3) * f10;
- float f11 = (float)(d2 - et.b(d2));
- float f12 = (float)(d3 - et.b(d3));
- int i3 = 8;
- int i4 = 4;
- float f13 = 0.000976563F;
- GL11.glScalef(f2, 1.0F, f2);
- for (int i5 = 0; i5 < 2; i5++) {
- if (i5 == 0) {
- GL11.glColorMask(false, false, false, false);
- }
- else if (this.r.z.g) {
- if (iv.b == 0) GL11.glColorMask(false, true, true, true); else
- GL11.glColorMask(true, false, false, true);
- }
- else GL11.glColorMask(true, true, true, true);
- for (int i6 = -i4 + 1; i6 <= i4; i6++) {
- for (int i7 = -i4 + 1; i7 <= i4; i7++) {
- localxd.b();
- float f14 = i6 * i3;
- float f15 = i7 * i3;
- float f16 = f14 - f11;
- float f17 = f15 - f12;
- if (f4 > -f3 - 1.0F) {
- localxd.a(f5 * 0.7F, f6 * 0.7F, f7 * 0.7F, 0.8F);
- localxd.b(0.0F, -1.0F, 0.0F);
- localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i3, (f14 + 0.0F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i3, f4 + 0.0F, f17 + i3, (f14 + i3) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i3, f4 + 0.0F, f17 + 0.0F, (f14 + i3) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- }
- if (f4 <= f3 + 1.0F) {
- localxd.a(f5, f6, f7, 0.8F);
- localxd.b(0.0F, 1.0F, 0.0F);
- localxd.a(f16 + 0.0F, f4 + f3 - f13, f17 + i3, (f14 + 0.0F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i3, f4 + f3 - f13, f17 + i3, (f14 + i3) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i3, f4 + f3 - f13, f17 + 0.0F, (f14 + i3) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- localxd.a(f16 + 0.0F, f4 + f3 - f13, f17 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- }
- localxd.a(f5 * 0.9F, f6 * 0.9F, f7 * 0.9F, 0.8F);
- int i8;
- if (i6 > -1) {
- localxd.b(-1.0F, 0.0F, 0.0F);
- for (i8 = 0; i8 < i3; i8++) {
- localxd.a(f16 + i8 + 0.0F, f4 + 0.0F, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i8 + 0.0F, f4 + f3, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i8 + 0.0F, f4 + f3, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- localxd.a(f16 + i8 + 0.0F, f4 + 0.0F, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- }
- }
- if (i6 <= 1) {
- localxd.b(1.0F, 0.0F, 0.0F);
- for (i8 = 0; i8 < i3; i8++) {
- localxd.a(f16 + i8 + 1.0F - f13, f4 + 0.0F, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i8 + 1.0F - f13, f4 + f3, f17 + i3, (f14 + i8 + 0.5F) * f10 + f8, (f15 + i3) * f10 + f9);
- localxd.a(f16 + i8 + 1.0F - f13, f4 + f3, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- localxd.a(f16 + i8 + 1.0F - f13, f4 + 0.0F, f17 + 0.0F, (f14 + i8 + 0.5F) * f10 + f8, (f15 + 0.0F) * f10 + f9);
- }
- }
- localxd.a(f5 * 0.8F, f6 * 0.8F, f7 * 0.8F, 0.8F);
- if (i7 > -1) {
- localxd.b(0.0F, 0.0F, -1.0F);
- for (i8 = 0; i8 < i3; i8++) {
- localxd.a(f16 + 0.0F, f4 + f3, f17 + i8 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + i3, f4 + f3, f17 + i8 + 0.0F, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + i3, f4 + 0.0F, f17 + i8 + 0.0F, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i8 + 0.0F, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- }
- }
- if (i7 <= 1) {
- localxd.b(0.0F, 0.0F, 1.0F);
- for (i8 = 0; i8 < i3; i8++) {
- localxd.a(f16 + 0.0F, f4 + f3, f17 + i8 + 1.0F - f13, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + i3, f4 + f3, f17 + i8 + 1.0F - f13, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + i3, f4 + 0.0F, f17 + i8 + 1.0F - f13, (f14 + i3) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- localxd.a(f16 + 0.0F, f4 + 0.0F, f17 + i8 + 1.0F - f13, (f14 + 0.0F) * f10 + f8, (f15 + i8 + 0.5F) * f10 + f9);
- }
- }
- localxd.a();
- }
- }
- }
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glDisable(3042);
- GL11.glEnable(2884);
- }
- public boolean a(wc paramwc, boolean paramBoolean)
- {
- int i1 = 0;
- if (i1 != 0) {
- Collections.sort(this.k, new gp(paramwc));
- i2 = this.k.size() - 1;
- int i3 = this.k.size();
- for (int i4 = 0; i4 < i3; i4++) {
- localObject = (bv)this.k.get(i2 - i4);
- if (!paramBoolean) {
- if (((bv)localObject).a(paramwc) > 256.0F) {
- if (((bv)localObject).o) {
- if (i4 >= 3) return false;
- }
- else if (i4 >= 1) return false;
- }
- }
- else
- if (!((bv)localObject).o)
- continue;
- ((bv)localObject).a();
- this.k.remove(localObject);
- ((bv)localObject).u = false;
- }
- return this.k.size() == 0;
- }
- int i2 = 2;
- gp localgp = new gp(paramwc);
- bv[] arrayOfbv = new bv[i2];
- Object localObject = null;
- int i5 = this.k.size();
- int i6 = 0;
- bv localbv1;
- for (int i7 = 0; i7 < i5; i7++) {
- localbv1 = (bv)this.k.get(i7);
- if (!paramBoolean) {
- if (localbv1.a(paramwc) > 256.0F)
- {
- for (int i9 = 0; (i9 < i2) && (
- (arrayOfbv[i9] == null) || (localgp.a(arrayOfbv[i9], localbv1) <= 0)); i9++);
- i9--;
- if (i9 <= 0) continue;
- i11 = i9;
- while (true) { i11--; if (i11 == 0) break;
- arrayOfbv[(i11 - 1)] = arrayOfbv[i11];
- }
- arrayOfbv[i9] = localbv1;
- continue;
- }
- }
- else {
- if (!localbv1.o)
- {
- continue;
- }
- }
- if (localObject == null) {
- localObject = new ArrayList();
- }
- i6++;
- ((ArrayList)localObject).add(localbv1);
- this.k.set(i7, null);
- }
- if (localObject != null) {
- if (((ArrayList)localObject).size() > 1) Collections.sort((List)localObject, localgp);
- for (i7 = ((ArrayList)localObject).size() - 1; i7 >= 0; i7--) {
- localbv1 = (bv)((ArrayList)localObject).get(i7);
- localbv1.a();
- localbv1.u = false;
- }
- }
- i7 = 0;
- for (int i8 = i2 - 1; i8 >= 0; i8--) {
- bv localbv2 = arrayOfbv[i8];
- if (localbv2 != null) {
- if ((!localbv2.o) && (i8 != i2 - 1))
- {
- arrayOfbv[i8] = null;
- arrayOfbv[0] = null;
- break;
- }
- arrayOfbv[i8].a();
- arrayOfbv[i8].u = false;
- i7++;
- }
- }
- i8 = 0;
- int i10 = 0;
- int i11 = this.k.size();
- while (i8 != i11) {
- bv localbv3 = (bv)this.k.get(i8);
- if (localbv3 != null) {
- int i12 = 0;
- for (int i13 = 0; (i13 < i2) && (i12 == 0); i13++) {
- if (localbv3 == arrayOfbv[i13]) {
- i12 = 1;
- }
- }
- if (i12 == 0) {
- if (i10 != i8) {
- this.k.set(i10, localbv3);
- }
- i10++;
- }
- }
- i8++;
- }
- while (true)
- {
- i8--; if (i8 < i10) break;
- this.k.remove(i8);
- }
- return i5 == i6 + i7;
- }
- public void a(sz paramsz, lz paramlz, int paramInt, ul paramul, float paramFloat)
- {
- xd localxd = xd.a;
- GL11.glEnable(3042);
- GL11.glEnable(3008);
- GL11.glBlendFunc(770, 1);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, (et.a((float)System.currentTimeMillis() / 100.0F) * 0.2F + 0.4F) * 0.5F);
- int i2;
- if (paramInt == 0)
- {
- if (this.g > 0.0F) {
- GL11.glBlendFunc(774, 768);
- int i1 = this.j.b("/terrain.png");
- GL11.glBindTexture(3553, i1);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
- GL11.glPushMatrix();
- i2 = this.i.a(paramlz.b, paramlz.c, paramlz.d);
- lq locallq = i2 > 0 ? lq.m[i2] : null;
- GL11.glDisable(3008);
- GL11.glPolygonOffset(-3.0F, -3.0F);
- GL11.glEnable(32823);
- double d1 = paramsz.N + (paramsz.o - paramsz.N) * paramFloat;
- double d2 = paramsz.O + (paramsz.p - paramsz.O) * paramFloat;
- double d3 = paramsz.P + (paramsz.q - paramsz.P) * paramFloat;
- if (locallq == null) locallq = lq.u;
- GL11.glEnable(3008);
- localxd.b();
- localxd.b(-d1, -d2, -d3);
- localxd.c();
- this.s.a(locallq, paramlz.b, paramlz.c, paramlz.d, 240 + (int)(this.g * 10.0F));
- localxd.a();
- localxd.b(0.0D, 0.0D, 0.0D);
- GL11.glDisable(3008);
- GL11.glPolygonOffset(0.0F, 0.0F);
- GL11.glDisable(32823);
- GL11.glEnable(3008);
- GL11.glDepthMask(true);
- GL11.glPopMatrix();
- }
- } else if (paramul != null) {
- GL11.glBlendFunc(770, 771);
- float f1 = et.a((float)System.currentTimeMillis() / 100.0F) * 0.2F + 0.8F;
- GL11.glColor4f(f1, f1, f1, et.a((float)System.currentTimeMillis() / 200.0F) * 0.2F + 0.5F);
- i2 = this.j.b("/terrain.png");
- GL11.glBindTexture(3553, i2);
- int i3 = paramlz.b;
- int i4 = paramlz.c;
- int i5 = paramlz.d;
- if (paramlz.e == 0) i4--;
- if (paramlz.e == 1) i4++;
- if (paramlz.e == 2) i5--;
- if (paramlz.e == 3) i5++;
- if (paramlz.e == 4) i3--;
- if (paramlz.e == 5) i3++;
- }
- GL11.glDisable(3042);
- GL11.glDisable(3008);
- }
- public void b(sz paramsz, lz paramlz, int paramInt, ul paramul, float paramFloat) {
- if ((paramInt == 0) && (paramlz.a == up.a)) {
- GL11.glEnable(3042);
- GL11.glBlendFunc(770, 771);
- GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
- GL11.glLineWidth(2.0F);
- GL11.glDisable(3553);
- GL11.glDepthMask(false);
- float f1 = 0.002F;
- int i1 = this.i.a(paramlz.b, paramlz.c, paramlz.d);
- if (i1 > 0) {
- lq.m[i1].a(this.i, paramlz.b, paramlz.c, paramlz.d);
- double d1 = paramsz.N + (paramsz.o - paramsz.N) * paramFloat;
- double d2 = paramsz.O + (paramsz.p - paramsz.O) * paramFloat;
- double d3 = paramsz.P + (paramsz.q - paramsz.P) * paramFloat;
- a(lq.m[i1].d(this.i, paramlz.b, paramlz.c, paramlz.d).b(f1, f1, f1).c(-d1, -d2, -d3));
- }
- GL11.glDepthMask(true);
- GL11.glEnable(3553);
- GL11.glDisable(3042);
- }
- }
- private void a(ro paramro) {
- xd localxd = xd.a;
- localxd.a(3);
- localxd.a(paramro.a, paramro.b, paramro.c);
- localxd.a(paramro.d, paramro.b, paramro.c);
- localxd.a(paramro.d, paramro.b, paramro.f);
- localxd.a(paramro.a, paramro.b, paramro.f);
- localxd.a(paramro.a, paramro.b, paramro.c);
- localxd.a();
- localxd.a(3);
- localxd.a(paramro.a, paramro.e, paramro.c);
- localxd.a(paramro.d, paramro.e, paramro.c);
- localxd.a(paramro.d, paramro.e, paramro.f);
- localxd.a(paramro.a, paramro.e, paramro.f);
- localxd.a(paramro.a, paramro.e, paramro.c);
- localxd.a();
- localxd.a(1);
- localxd.a(paramro.a, paramro.b, paramro.c);
- localxd.a(paramro.a, paramro.e, paramro.c);
- localxd.a(paramro.d, paramro.b, paramro.c);
- localxd.a(paramro.d, paramro.e, paramro.c);
- localxd.a(paramro.d, paramro.b, paramro.f);
- localxd.a(paramro.d, paramro.e, paramro.f);
- localxd.a(paramro.a, paramro.b, paramro.f);
- localxd.a(paramro.a, paramro.e, paramro.f);
- localxd.a();
- }
- public void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
- int i1 = et.a(paramInt1, 16);
- int i2 = et.a(paramInt2, 16);
- int i3 = et.a(paramInt3, 16);
- int i4 = et.a(paramInt4, 16);
- int i5 = et.a(paramInt5, 16);
- int i6 = et.a(paramInt6, 16);
- for (int i7 = i1; i7 <= i4; i7++) {
- int i8 = i7 % this.n;
- if (i8 < 0) i8 += this.n;
- for (int i9 = i2; i9 <= i5; i9++) {
- int i10 = i9 % this.o;
- if (i10 < 0) i10 += this.o;
- for (int i11 = i3; i11 <= i6; i11++) {
- int i12 = i11 % this.p;
- if (i12 < 0) i12 += this.p;
- int i13 = (i12 * this.o + i10) * this.n + i8;
- bv localbv = this.m[i13];
- if (!localbv.u) {
- this.k.add(localbv);
- localbv.f();
- }
- }
- }
- }
- }
- public void a(int paramInt1, int paramInt2, int paramInt3) {
- a(paramInt1 - 1, paramInt2 - 1, paramInt3 - 1, paramInt1 + 1, paramInt2 + 1, paramInt3 + 1);
- }
- public void b(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
- a(paramInt1 - 1, paramInt2 - 1, paramInt3 - 1, paramInt4 + 1, paramInt5 + 1, paramInt6 + 1);
- }
- public void a(adt paramadt, float paramFloat)
- {
- for (int i1 = 0; i1 < this.m.length; i1++) {
- if ((this.m[i1].e()) || (
- (this.m[i1].o) && ((i1 + this.h & 0xF) != 0))) continue;
- this.m[i1].a(paramadt);
- }
- this.h += 1;
- }
- public void a(String paramString, int paramInt1, int paramInt2, int paramInt3)
- {
- if (paramString != null) {
- this.r.v.b("C418 - " + paramString);
- }
- this.r.B.a(paramString, paramInt1, paramInt2, paramInt3, 1.0F, 1.0F);
- }
- public void a(String paramString, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2) {
- float f1 = 16.0F;
- if (paramFloat1 > 1.0F) f1 *= paramFloat1;
- if (this.r.i.f(paramDouble1, paramDouble2, paramDouble3) < f1 * f1)
- this.r.B.b(paramString, (float)paramDouble1, (float)paramDouble2, (float)paramDouble3, paramFloat1, paramFloat2);
- }
- public void a(String paramString, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
- {
- if ((this.r == null) || (this.r.i == null) || (this.r.j == null)) return;
- double d1 = this.r.i.o - paramDouble1;
- double d2 = this.r.i.p - paramDouble2;
- double d3 = this.r.i.q - paramDouble3;
- double d4 = 16.0D;
- if (paramString.equals("hugeexplosion")) this.r.j.a(new acv(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- if (paramString.equals("largeexplode")) this.r.j.a(new gk(this.j, this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- if (d1 * d1 + d2 * d2 + d3 * d3 > d4 * d4) return;
- if (paramString.equals("bubble")) { this.r.j.a(new qk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("suspended")) { this.r.j.a(new il(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("depthsuspend")) { this.r.j.a(new sk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("townaura")) { this.r.j.a(new sk(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("crit")) { this.r.j.a(new oh(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("smoke")) { this.r.j.a(new ade(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("note")) { this.r.j.a(new v(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("portal")) { this.r.j.a(new xq(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("explode")) { this.r.j.a(new ta(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("flame")) { this.r.j.a(new jj(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("lava")) { this.r.j.a(new da(this.i, paramDouble1, paramDouble2, paramDouble3));
- } else if (paramString.equals("footstep")) { this.r.j.a(new st(this.j, this.i, paramDouble1, paramDouble2, paramDouble3));
- } else if (paramString.equals("splash")) { this.r.j.a(new kr(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("largesmoke")) { this.r.j.a(new ade(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, 2.5F));
- } else if (paramString.equals("cloud")) { this.r.j.a(new abm(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("reddust")) { this.r.j.a(new ub(this.i, paramDouble1, paramDouble2, paramDouble3, (float)paramDouble4, (float)paramDouble5, (float)paramDouble6));
- } else if (paramString.equals("snowballpoof")) { this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, su.aE));
- } else if (paramString.equals("snowshovel")) { this.r.j.a(new hd(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- } else if (paramString.equals("slime")) { this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, su.aN));
- } else if (paramString.equals("heart")) { this.r.j.a(new vf(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6));
- }
- else
- {
- int i1;
- if (paramString.startsWith("iconcrack_")) {
- i1 = Integer.parseInt(paramString.substring(paramString.indexOf("_") + 1));
- this.r.j.a(new ip(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, su.f[i1]));
- } else if (paramString.startsWith("tilecrack_")) {
- i1 = Integer.parseInt(paramString.substring(paramString.indexOf("_") + 1));
- this.r.j.a(new jc(this.i, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, lq.m[i1], 0, 0));
- }
- }
- }
- public void a(ki paramki)
- {
- paramki.K();
- if (paramki.ac != null) this.j.a(paramki.ac, new jv());
- if (paramki.ad != null) this.j.a(paramki.ad, new jv());
- }
- public void b(ki paramki)
- {
- if (paramki.ac != null) this.j.c(paramki.ac);
- if (paramki.ad != null) this.j.c(paramki.ad);
- }
- public void a(int paramInt1, int paramInt2, int paramInt3, ij paramij)
- {
- }
- public void e() {
- dl.b(this.q);
- }
- public void a(sz paramsz, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5) {
- Random localRandom = this.i.w;
- int i3;
- switch (paramInt1) {
- case 1001:
- this.i.a(paramInt2, paramInt3, paramInt4, "random.click", 1.0F, 1.2F);
- break;
- case 1000:
- this.i.a(paramInt2, paramInt3, paramInt4, "random.click", 1.0F, 1.0F);
- break;
- case 1002:
- this.i.a(paramInt2, paramInt3, paramInt4, "random.bow", 1.0F, 1.2F);
- break;
- case 2000:
- int i1 = paramInt5 % 3 - 1;
- int i2 = paramInt5 / 3 % 3 - 1;
- double d1 = paramInt2 + i1 * 0.6D + 0.5D;
- double d2 = paramInt3 + 0.5D;
- double d3 = paramInt4 + i2 * 0.6D + 0.5D;
- for (i3 = 0; i3 < 10; i3++) {
- double d4 = localRandom.nextDouble() * 0.2D + 0.01D;
- double d5 = d1 + i1 * 0.01D + (localRandom.nextDouble() - 0.5D) * i2 * 0.5D;
- double d6 = d2 + (localRandom.nextDouble() - 0.5D) * 0.5D;
- double d7 = d3 + i2 * 0.01D + (localRandom.nextDouble() - 0.5D) * i1 * 0.5D;
- double d8 = i1 * d4 + localRandom.nextGaussian() * 0.01D;
- double d9 = -0.03D + localRandom.nextGaussian() * 0.01D;
- double d10 = i2 * d4 + localRandom.nextGaussian() * 0.01D;
- a("smoke", d5, d6, d7, d8, d9, d10);
- }
- break;
- case 2001:
- i3 = paramInt5 & 0xFF;
- if (i3 > 0) {
- lq locallq = lq.m[i3];
- 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);
- }
- this.r.j.a(paramInt2, paramInt3, paramInt4, paramInt5 & 0xFF, paramInt5 >> 8 & 0xFF);
- break;
- case 1003:
- if (Math.random() < 0.5D)
- 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);
- else {
- 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);
- }
- break;
- case 1004:
- this.i.a(paramInt2 + 0.5F, paramInt3 + 0.5F, paramInt4 + 0.5F, "random.fizz", 0.5F, 2.6F + (localRandom.nextFloat() - localRandom.nextFloat()) * 0.8F);
- break;
- case 1005:
- if ((su.f[paramInt5] instanceof aat))
- this.i.a(((aat)su.f[paramInt5]).a, paramInt2, paramInt3, paramInt4);
- else
- this.i.a(null, paramInt2, paramInt3, paramInt4);
- }
- }
- }
Add Comment
Please, Sign In to add comment