Esempio n. 1
0
 public void func_72290_b_(World p_72290_1_, int p_72290_2_, int p_72290_3_, int p_72290_4_) {
   if (p_72290_1_.field_72995_K) {
     return;
   }
   int i = p_72290_1_.func_72798_a(p_72290_2_, p_72290_3_, p_72290_4_ - 1);
   int j = p_72290_1_.func_72798_a(p_72290_2_, p_72290_3_, p_72290_4_ + 1);
   int k = p_72290_1_.func_72798_a(p_72290_2_ - 1, p_72290_3_, p_72290_4_);
   int l = p_72290_1_.func_72798_a(p_72290_2_ + 1, p_72290_3_, p_72290_4_);
   byte byte0 = 4;
   if (i == field_71990_ca || j == field_71990_ca) {
     int i1 =
         p_72290_1_.func_72798_a(
             p_72290_2_ - 1, p_72290_3_, i != field_71990_ca ? p_72290_4_ + 1 : p_72290_4_ - 1);
     int k1 =
         p_72290_1_.func_72798_a(
             p_72290_2_ + 1, p_72290_3_, i != field_71990_ca ? p_72290_4_ + 1 : p_72290_4_ - 1);
     byte0 = 5;
     int i2 = -1;
     if (i == field_71990_ca) {
       i2 = p_72290_1_.func_72805_g(p_72290_2_, p_72290_3_, p_72290_4_ - 1);
     } else {
       i2 = p_72290_1_.func_72805_g(p_72290_2_, p_72290_3_, p_72290_4_ + 1);
     }
     if (i2 == 4) {
       byte0 = 4;
     }
     if ((Block.field_71970_n[k] || Block.field_71970_n[i1])
         && !Block.field_71970_n[l]
         && !Block.field_71970_n[k1]) {
       byte0 = 5;
     }
     if ((Block.field_71970_n[l] || Block.field_71970_n[k1])
         && !Block.field_71970_n[k]
         && !Block.field_71970_n[i1]) {
       byte0 = 4;
     }
   } else if (k == field_71990_ca || l == field_71990_ca) {
     int j1 =
         p_72290_1_.func_72798_a(
             k != field_71990_ca ? p_72290_2_ + 1 : p_72290_2_ - 1, p_72290_3_, p_72290_4_ - 1);
     int l1 =
         p_72290_1_.func_72798_a(
             k != field_71990_ca ? p_72290_2_ + 1 : p_72290_2_ - 1, p_72290_3_, p_72290_4_ + 1);
     byte0 = 3;
     int j2 = -1;
     if (k == field_71990_ca) {
       j2 = p_72290_1_.func_72805_g(p_72290_2_ - 1, p_72290_3_, p_72290_4_);
     } else {
       j2 = p_72290_1_.func_72805_g(p_72290_2_ + 1, p_72290_3_, p_72290_4_);
     }
     if (j2 == 2) {
       byte0 = 2;
     }
     if ((Block.field_71970_n[i] || Block.field_71970_n[j1])
         && !Block.field_71970_n[j]
         && !Block.field_71970_n[l1]) {
       byte0 = 3;
     }
     if ((Block.field_71970_n[j] || Block.field_71970_n[l1])
         && !Block.field_71970_n[i]
         && !Block.field_71970_n[j1]) {
       byte0 = 2;
     }
   } else {
     byte0 = 3;
     if (Block.field_71970_n[i] && !Block.field_71970_n[j]) {
       byte0 = 3;
     }
     if (Block.field_71970_n[j] && !Block.field_71970_n[i]) {
       byte0 = 2;
     }
     if (Block.field_71970_n[k] && !Block.field_71970_n[l]) {
       byte0 = 5;
     }
     if (Block.field_71970_n[l] && !Block.field_71970_n[k]) {
       byte0 = 4;
     }
   }
   p_72290_1_.func_72921_c(p_72290_2_, p_72290_3_, p_72290_4_, byte0);
 }
Esempio n. 2
0
 public void func_77279_a(boolean p_77279_1_) {
   field_77287_j.func_72908_a(
       field_77284_b,
       field_77285_c,
       field_77282_d,
       "random.explode",
       4F,
       (1.0F
               + (field_77287_j.field_73012_v.nextFloat()
                       - field_77287_j.field_73012_v.nextFloat())
                   * 0.2F)
           * 0.7F);
   field_77287_j.func_72869_a(
       "hugeexplosion", field_77284_b, field_77285_c, field_77282_d, 0.0D, 0.0D, 0.0D);
   Iterator iterator = field_77281_g.iterator();
   do {
     if (!iterator.hasNext()) {
       break;
     }
     ChunkPosition chunkposition = (ChunkPosition) iterator.next();
     int i = chunkposition.field_76930_a;
     int k = chunkposition.field_76928_b;
     int i1 = chunkposition.field_76929_c;
     int k1 = field_77287_j.func_72798_a(i, k, i1);
     if (p_77279_1_) {
       double d = (float) i + field_77287_j.field_73012_v.nextFloat();
       double d1 = (float) k + field_77287_j.field_73012_v.nextFloat();
       double d2 = (float) i1 + field_77287_j.field_73012_v.nextFloat();
       double d3 = d - field_77284_b;
       double d4 = d1 - field_77285_c;
       double d5 = d2 - field_77282_d;
       double d6 = MathHelper.func_76133_a(d3 * d3 + d4 * d4 + d5 * d5);
       d3 /= d6;
       d4 /= d6;
       d5 /= d6;
       double d7 = 0.5D / (d6 / (double) field_77280_f + 0.10000000000000001D);
       d7 *=
           field_77287_j.field_73012_v.nextFloat() * field_77287_j.field_73012_v.nextFloat()
               + 0.3F;
       d3 *= d7;
       d4 *= d7;
       d5 *= d7;
       field_77287_j.func_72869_a(
           "explode",
           (d + field_77284_b * 1.0D) / 2D,
           (d1 + field_77285_c * 1.0D) / 2D,
           (d2 + field_77282_d * 1.0D) / 2D,
           d3,
           d4,
           d5);
       field_77287_j.func_72869_a("smoke", d, d1, d2, d3, d4, d5);
     }
     if (k1 > 0) {
       Block.field_71973_m[k1].func_71914_a(
           field_77287_j, i, k, i1, field_77287_j.func_72805_g(i, k, i1), 0.3F, 0);
       if (field_77287_j.func_72930_a(i, k, i1, 0, 0, field_77287_j.field_72995_K)) {
         field_77287_j.func_72898_h(i, k, i1, 0);
       }
       Block.field_71973_m[k1].func_71867_k(field_77287_j, i, k, i1);
     }
   } while (true);
   if (field_77286_a) {
     Iterator iterator1 = field_77281_g.iterator();
     do {
       if (!iterator1.hasNext()) {
         break;
       }
       ChunkPosition chunkposition1 = (ChunkPosition) iterator1.next();
       int j = chunkposition1.field_76930_a;
       int l = chunkposition1.field_76928_b;
       int j1 = chunkposition1.field_76929_c;
       int l1 = field_77287_j.func_72798_a(j, l, j1);
       int i2 = field_77287_j.func_72798_a(j, l - 1, j1);
       if (l1 == 0 && Block.field_71970_n[i2] && field_77290_i.nextInt(3) == 0) {
         field_77287_j.func_72859_e(j, l, j1, Block.field_72067_ar.field_71990_ca);
       }
     } while (true);
   }
 }