Пример #1
0
  private void func_72200_l(World p_72200_1_, int p_72200_2_, int p_72200_3_, int p_72200_4_) {
    if (p_72200_1_.func_72798_a(p_72200_2_, p_72200_3_, p_72200_4_) == this.field_71990_ca) {
      if (this.field_72018_cp == Material.field_76256_h) {
        boolean var5 = false;
        if (var5
            || p_72200_1_.func_72803_f(p_72200_2_, p_72200_3_, p_72200_4_ - 1)
                == Material.field_76244_g) {
          var5 = true;
        }

        if (var5
            || p_72200_1_.func_72803_f(p_72200_2_, p_72200_3_, p_72200_4_ + 1)
                == Material.field_76244_g) {
          var5 = true;
        }

        if (var5
            || p_72200_1_.func_72803_f(p_72200_2_ - 1, p_72200_3_, p_72200_4_)
                == Material.field_76244_g) {
          var5 = true;
        }

        if (var5
            || p_72200_1_.func_72803_f(p_72200_2_ + 1, p_72200_3_, p_72200_4_)
                == Material.field_76244_g) {
          var5 = true;
        }

        if (var5
            || p_72200_1_.func_72803_f(p_72200_2_, p_72200_3_ + 1, p_72200_4_)
                == Material.field_76244_g) {
          var5 = true;
        }

        if (var5) {
          int var6 = p_72200_1_.func_72805_g(p_72200_2_, p_72200_3_, p_72200_4_);
          if (var6 == 0) {
            p_72200_1_.func_94575_c(
                p_72200_2_, p_72200_3_, p_72200_4_, Block.field_72089_ap.field_71990_ca);
          } else if (var6 <= 4) {
            p_72200_1_.func_94575_c(
                p_72200_2_, p_72200_3_, p_72200_4_, Block.field_71978_w.field_71990_ca);
          }

          this.func_72201_j(p_72200_1_, p_72200_2_, p_72200_3_, p_72200_4_);
        }
      }
    }
  }
Пример #2
0
 public void func_71863_a(
     World p_71863_1_, int p_71863_2_, int p_71863_3_, int p_71863_4_, int p_71863_5_) {
   super.func_71863_a(p_71863_1_, p_71863_2_, p_71863_3_, p_71863_4_, p_71863_5_);
   Material var6 = p_71863_1_.func_72803_f(p_71863_2_, p_71863_3_ + 1, p_71863_4_);
   if (var6.func_76220_a()) {
     p_71863_1_.func_94575_c(
         p_71863_2_, p_71863_3_, p_71863_4_, Block.field_71979_v.field_71990_ca);
   }
 }
Пример #3
0
  private boolean func_72247_n(World p_72247_1_, int p_72247_2_, int p_72247_3_, int p_72247_4_) {
    for (int var5 = p_72247_2_ - 4; var5 <= p_72247_2_ + 4; ++var5) {
      for (int var6 = p_72247_3_; var6 <= p_72247_3_ + 1; ++var6) {
        for (int var7 = p_72247_4_ - 4; var7 <= p_72247_4_ + 4; ++var7) {
          if (p_72247_1_.func_72803_f(var5, var6, var7) == Material.field_76244_g) {
            return true;
          }
        }
      }
    }

    return false;
  }
Пример #4
0
 protected void func_74870_b(
     World p_74870_1_,
     int p_74870_2_,
     int p_74870_3_,
     int p_74870_4_,
     int p_74870_5_,
     int p_74870_6_,
     StructureBoundingBox p_74870_7_) {
   int var8 = this.func_74865_a(p_74870_4_, p_74870_6_);
   int var9 = this.func_74862_a(p_74870_5_);
   int var10 = this.func_74873_b(p_74870_4_, p_74870_6_);
   if (p_74870_7_.func_78890_b(var8, var9, var10)) {
     while ((p_74870_1_.func_72799_c(var8, var9, var10)
             || p_74870_1_.func_72803_f(var8, var9, var10).func_76224_d())
         && var9 > 1) {
       p_74870_1_.func_72832_d(var8, var9, var10, p_74870_2_, p_74870_3_, 2);
       --var9;
     }
   }
 }
Пример #5
0
 protected int func_72198_f_(World p_72198_1_, int p_72198_2_, int p_72198_3_, int p_72198_4_) {
   return p_72198_1_.func_72803_f(p_72198_2_, p_72198_3_, p_72198_4_) == this.field_72018_cp
       ? p_72198_1_.func_72805_g(p_72198_2_, p_72198_3_, p_72198_4_)
       : -1;
 }
Пример #6
0
  @SideOnly(Side.CLIENT)
  public void func_71862_a(
      World p_71862_1_, int p_71862_2_, int p_71862_3_, int p_71862_4_, Random p_71862_5_) {
    int var6;
    if (this.field_72018_cp == Material.field_76244_g) {
      if (p_71862_5_.nextInt(10) == 0) {
        var6 = p_71862_1_.func_72805_g(p_71862_2_, p_71862_3_, p_71862_4_);
        if (var6 <= 0 || var6 >= 8) {
          p_71862_1_.func_72869_a(
              "suspended",
              (double) ((float) p_71862_2_ + p_71862_5_.nextFloat()),
              (double) ((float) p_71862_3_ + p_71862_5_.nextFloat()),
              (double) ((float) p_71862_4_ + p_71862_5_.nextFloat()),
              0.0D,
              0.0D,
              0.0D);
        }
      }

      for (var6 = 0; var6 < 0; ++var6) {
        int var7 = p_71862_5_.nextInt(4);
        int var8 = p_71862_2_;
        int var9 = p_71862_4_;
        if (var7 == 0) {
          var8 = p_71862_2_ - 1;
        }

        if (var7 == 1) {
          ++var8;
        }

        if (var7 == 2) {
          var9 = p_71862_4_ - 1;
        }

        if (var7 == 3) {
          ++var9;
        }

        if (p_71862_1_.func_72803_f(var8, p_71862_3_, var9) == Material.field_76249_a
            && (p_71862_1_.func_72803_f(var8, p_71862_3_ - 1, var9).func_76230_c()
                || p_71862_1_.func_72803_f(var8, p_71862_3_ - 1, var9).func_76224_d())) {
          float var10 = 0.0625F;
          double var11 = (double) ((float) p_71862_2_ + p_71862_5_.nextFloat());
          double var13 = (double) ((float) p_71862_3_ + p_71862_5_.nextFloat());
          double var15 = (double) ((float) p_71862_4_ + p_71862_5_.nextFloat());
          if (var7 == 0) {
            var11 = (double) ((float) p_71862_2_ - var10);
          }

          if (var7 == 1) {
            var11 = (double) ((float) (p_71862_2_ + 1) + var10);
          }

          if (var7 == 2) {
            var15 = (double) ((float) p_71862_4_ - var10);
          }

          if (var7 == 3) {
            var15 = (double) ((float) (p_71862_4_ + 1) + var10);
          }

          double var17 = 0.0D;
          double var19 = 0.0D;
          if (var7 == 0) {
            var17 = (double) (-var10);
          }

          if (var7 == 1) {
            var17 = (double) var10;
          }

          if (var7 == 2) {
            var19 = (double) (-var10);
          }

          if (var7 == 3) {
            var19 = (double) var10;
          }

          p_71862_1_.func_72869_a("splash", var11, var13, var15, var17, 0.0D, var19);
        }
      }
    }

    if (this.field_72018_cp == Material.field_76244_g && p_71862_5_.nextInt(64) == 0) {
      var6 = p_71862_1_.func_72805_g(p_71862_2_, p_71862_3_, p_71862_4_);
      if (var6 > 0 && var6 < 8) {
        p_71862_1_.func_72980_b(
            (double) ((float) p_71862_2_ + 0.5F),
            (double) ((float) p_71862_3_ + 0.5F),
            (double) ((float) p_71862_4_ + 0.5F),
            "liquid.water",
            p_71862_5_.nextFloat() * 0.25F + 0.75F,
            p_71862_5_.nextFloat() * 1.0F + 0.5F,
            false);
      }
    }

    double var21;
    double var23;
    double var22;
    if (this.field_72018_cp == Material.field_76256_h
        && p_71862_1_.func_72803_f(p_71862_2_, p_71862_3_ + 1, p_71862_4_) == Material.field_76249_a
        && !p_71862_1_.func_72804_r(p_71862_2_, p_71862_3_ + 1, p_71862_4_)) {
      if (p_71862_5_.nextInt(100) == 0) {
        var21 = (double) ((float) p_71862_2_ + p_71862_5_.nextFloat());
        var22 = (double) p_71862_3_ + this.field_72022_cl;
        var23 = (double) ((float) p_71862_4_ + p_71862_5_.nextFloat());
        p_71862_1_.func_72869_a("lava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
        p_71862_1_.func_72980_b(
            var21,
            var22,
            var23,
            "liquid.lavapop",
            0.2F + p_71862_5_.nextFloat() * 0.2F,
            0.9F + p_71862_5_.nextFloat() * 0.15F,
            false);
      }

      if (p_71862_5_.nextInt(200) == 0) {
        p_71862_1_.func_72980_b(
            (double) p_71862_2_,
            (double) p_71862_3_,
            (double) p_71862_4_,
            "liquid.lava",
            0.2F + p_71862_5_.nextFloat() * 0.2F,
            0.9F + p_71862_5_.nextFloat() * 0.15F,
            false);
      }
    }

    if (p_71862_5_.nextInt(10) == 0
        && p_71862_1_.func_72797_t(p_71862_2_, p_71862_3_ - 1, p_71862_4_)
        && !p_71862_1_.func_72803_f(p_71862_2_, p_71862_3_ - 2, p_71862_4_).func_76230_c()) {
      var21 = (double) ((float) p_71862_2_ + p_71862_5_.nextFloat());
      var22 = (double) p_71862_3_ - 1.05D;
      var23 = (double) ((float) p_71862_4_ + p_71862_5_.nextFloat());
      if (this.field_72018_cp == Material.field_76244_g) {
        p_71862_1_.func_72869_a("dripWater", var21, var22, var23, 0.0D, 0.0D, 0.0D);
      } else {
        p_71862_1_.func_72869_a("dripLava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
      }
    }
  }
Пример #7
0
  public boolean func_77648_a(
      ItemStack p_77648_1_,
      EntityPlayer p_77648_2_,
      World p_77648_3_,
      int p_77648_4_,
      int p_77648_5_,
      int p_77648_6_,
      int p_77648_7_,
      float p_77648_8_,
      float p_77648_9_,
      float p_77648_10_) {
    if (p_77648_7_ == 0) {
      return false;
    } else if (!p_77648_3_.func_72803_f(p_77648_4_, p_77648_5_, p_77648_6_).func_76220_a()) {
      return false;
    } else {
      if (p_77648_7_ == 1) {
        ++p_77648_5_;
      }

      if (p_77648_7_ == 2) {
        --p_77648_6_;
      }

      if (p_77648_7_ == 3) {
        ++p_77648_6_;
      }

      if (p_77648_7_ == 4) {
        --p_77648_4_;
      }

      if (p_77648_7_ == 5) {
        ++p_77648_4_;
      }

      if (!p_77648_2_.func_82247_a(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) {
        return false;
      } else if (!Block.field_72053_aD.func_71930_b(
          p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_)) {
        return false;
      } else {
        if (p_77648_7_ == 1) {
          int var11 =
              MathHelper.func_76128_c(
                      (double) ((p_77648_2_.field_70177_z + 180.0F) * 16.0F / 360.0F) + 0.5D)
                  & 15;
          p_77648_3_.func_72832_d(
              p_77648_4_, p_77648_5_, p_77648_6_, Block.field_72053_aD.field_71990_ca, var11, 2);
        } else {
          p_77648_3_.func_72832_d(
              p_77648_4_,
              p_77648_5_,
              p_77648_6_,
              Block.field_72042_aI.field_71990_ca,
              p_77648_7_,
              2);
        }

        --p_77648_1_.field_77994_a;
        TileEntitySign var12 =
            (TileEntitySign) p_77648_3_.func_72796_p(p_77648_4_, p_77648_5_, p_77648_6_);
        if (var12 != null) {
          p_77648_2_.func_71014_a(var12);
        }

        return true;
      }
    }
  }
Пример #8
0
  public boolean func_77648_a(
      ItemStack p_77648_1_,
      EntityPlayer p_77648_2_,
      World p_77648_3_,
      int p_77648_4_,
      int p_77648_5_,
      int p_77648_6_,
      int p_77648_7_,
      float p_77648_8_,
      float p_77648_9_,
      float p_77648_10_) {
    if (p_77648_7_ == 0) {
      return false;
    } else if (!p_77648_3_.func_72803_f(p_77648_4_, p_77648_5_, p_77648_6_).func_76220_a()) {
      return false;
    } else {
      if (p_77648_7_ == 1) {
        ++p_77648_5_;
      }

      if (p_77648_7_ == 2) {
        --p_77648_6_;
      }

      if (p_77648_7_ == 3) {
        ++p_77648_6_;
      }

      if (p_77648_7_ == 4) {
        --p_77648_4_;
      }

      if (p_77648_7_ == 5) {
        ++p_77648_4_;
      }

      if (!p_77648_2_.func_82247_a(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) {
        return false;
      } else if (!Block.field_82512_cj.func_71930_b(
          p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_)) {
        return false;
      } else {
        p_77648_3_.func_72832_d(
            p_77648_4_, p_77648_5_, p_77648_6_, Block.field_82512_cj.field_71990_ca, p_77648_7_, 2);
        int var11 = 0;
        if (p_77648_7_ == 1) {
          var11 =
              MathHelper.func_76128_c((double) (p_77648_2_.field_70177_z * 16.0F / 360.0F) + 0.5D)
                  & 15;
        }

        TileEntity var12 = p_77648_3_.func_72796_p(p_77648_4_, p_77648_5_, p_77648_6_);
        if (var12 != null && var12 instanceof TileEntitySkull) {
          String var13 = "";
          if (p_77648_1_.func_77942_o() && p_77648_1_.func_77978_p().func_74764_b("SkullOwner")) {
            var13 = p_77648_1_.func_77978_p().func_74779_i("SkullOwner");
          }

          ((TileEntitySkull) var12).func_82118_a(p_77648_1_.func_77960_j(), var13);
          ((TileEntitySkull) var12).func_82116_a(var11);
          ((BlockSkull) Block.field_82512_cj)
              .func_82529_a(
                  p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, (TileEntitySkull) var12);
        }

        --p_77648_1_.field_77994_a;
        return true;
      }
    }
  }