Example #1
0
  private void func_82535_o(World p_82535_1_, int p_82535_2_, int p_82535_3_, int p_82535_4_) {
    int var5 = p_82535_1_.func_72805_g(p_82535_2_, p_82535_3_, p_82535_4_);
    int var6 = var5 & 7;
    boolean var7 = (var5 & 8) != 0;
    this.func_82534_e(var5);
    List var9 =
        p_82535_1_.func_72872_a(
            EntityArrow.class,
            AxisAlignedBB.func_72332_a()
                .func_72299_a(
                    (double) p_82535_2_ + this.field_72026_ch,
                    (double) p_82535_3_ + this.field_72023_ci,
                    (double) p_82535_4_ + this.field_72024_cj,
                    (double) p_82535_2_ + this.field_72021_ck,
                    (double) p_82535_3_ + this.field_72022_cl,
                    (double) p_82535_4_ + this.field_72019_cm));
    boolean var8 = !var9.isEmpty();
    if (var8 && !var7) {
      p_82535_1_.func_72921_c(p_82535_2_, p_82535_3_, p_82535_4_, var6 | 8, 3);
      this.func_82536_d(p_82535_1_, p_82535_2_, p_82535_3_, p_82535_4_, var6);
      p_82535_1_.func_72909_d(
          p_82535_2_, p_82535_3_, p_82535_4_, p_82535_2_, p_82535_3_, p_82535_4_);
      p_82535_1_.func_72908_a(
          (double) p_82535_2_ + 0.5D,
          (double) p_82535_3_ + 0.5D,
          (double) p_82535_4_ + 0.5D,
          "random.click",
          0.3F,
          0.6F);
    }

    if (!var8 && var7) {
      p_82535_1_.func_72921_c(p_82535_2_, p_82535_3_, p_82535_4_, var6, 3);
      this.func_82536_d(p_82535_1_, p_82535_2_, p_82535_3_, p_82535_4_, var6);
      p_82535_1_.func_72909_d(
          p_82535_2_, p_82535_3_, p_82535_4_, p_82535_2_, p_82535_3_, p_82535_4_);
      p_82535_1_.func_72908_a(
          (double) p_82535_2_ + 0.5D,
          (double) p_82535_3_ + 0.5D,
          (double) p_82535_4_ + 0.5D,
          "random.click",
          0.3F,
          0.5F);
    }

    if (var8) {
      p_82535_1_.func_72836_a(
          p_82535_2_, p_82535_3_, p_82535_4_, this.field_71990_ca, this.func_71859_p_(p_82535_1_));
    }
  }
Example #2
0
 public boolean func_71903_a(
     World p_71903_1_,
     int p_71903_2_,
     int p_71903_3_,
     int p_71903_4_,
     EntityPlayer p_71903_5_,
     int p_71903_6_,
     float p_71903_7_,
     float p_71903_8_,
     float p_71903_9_) {
   int var10 = p_71903_1_.func_72805_g(p_71903_2_, p_71903_3_, p_71903_4_);
   int var11 = var10 & 7;
   int var12 = 8 - (var10 & 8);
   if (var12 == 0) {
     return true;
   } else {
     p_71903_1_.func_72921_c(p_71903_2_, p_71903_3_, p_71903_4_, var11 + var12, 3);
     p_71903_1_.func_72909_d(
         p_71903_2_, p_71903_3_, p_71903_4_, p_71903_2_, p_71903_3_, p_71903_4_);
     p_71903_1_.func_72908_a(
         (double) p_71903_2_ + 0.5D,
         (double) p_71903_3_ + 0.5D,
         (double) p_71903_4_ + 0.5D,
         "random.click",
         0.3F,
         0.6F);
     this.func_82536_d(p_71903_1_, p_71903_2_, p_71903_3_, p_71903_4_, var11);
     p_71903_1_.func_72836_a(
         p_71903_2_, p_71903_3_, p_71903_4_, this.field_71990_ca, this.func_71859_p_(p_71903_1_));
     return true;
   }
 }
  public void func_71847_b(
      World p_71847_1_, int p_71847_2_, int p_71847_3_, int p_71847_4_, Random p_71847_5_) {
    boolean var6 = this.func_72128_l(p_71847_1_, p_71847_2_, p_71847_3_, p_71847_4_);
    List var7 = (List) field_72129_b.get(p_71847_1_);

    while (var7 != null
        && !var7.isEmpty()
        && p_71847_1_.func_72820_D() - ((RedstoneUpdateInfo) var7.get(0)).field_73661_d > 60L) {
      var7.remove(0);
    }

    if (this.field_72130_a) {
      if (var6) {
        p_71847_1_.func_72832_d(
            p_71847_2_,
            p_71847_3_,
            p_71847_4_,
            Block.field_72049_aP.field_71990_ca,
            p_71847_1_.func_72805_g(p_71847_2_, p_71847_3_, p_71847_4_));
        if (this.func_72127_a(p_71847_1_, p_71847_2_, p_71847_3_, p_71847_4_, true)) {
          p_71847_1_.func_72908_a(
              (double) ((float) p_71847_2_ + 0.5F),
              (double) ((float) p_71847_3_ + 0.5F),
              (double) ((float) p_71847_4_ + 0.5F),
              "random.fizz",
              0.5F,
              2.6F
                  + (p_71847_1_.field_73012_v.nextFloat() - p_71847_1_.field_73012_v.nextFloat())
                      * 0.8F);

          for (int var8 = 0; var8 < 5; ++var8) {
            double var9 = (double) p_71847_2_ + p_71847_5_.nextDouble() * 0.6D + 0.2D;
            double var11 = (double) p_71847_3_ + p_71847_5_.nextDouble() * 0.6D + 0.2D;
            double var13 = (double) p_71847_4_ + p_71847_5_.nextDouble() * 0.6D + 0.2D;
            p_71847_1_.func_72869_a("smoke", var9, var11, var13, 0.0D, 0.0D, 0.0D);
          }
        }
      }
    } else if (!var6 && !this.func_72127_a(p_71847_1_, p_71847_2_, p_71847_3_, p_71847_4_, false)) {
      p_71847_1_.func_72832_d(
          p_71847_2_,
          p_71847_3_,
          p_71847_4_,
          Block.field_72035_aQ.field_71990_ca,
          p_71847_1_.func_72805_g(p_71847_2_, p_71847_3_, p_71847_4_));
    }
  }
  public boolean func_77875_a(
      World p_77875_1_,
      double p_77875_2_,
      double p_77875_4_,
      double p_77875_6_,
      int p_77875_8_,
      int p_77875_9_,
      int p_77875_10_) {
    if (this.field_77876_a <= 0) {
      return false;
    } else if (!p_77875_1_.func_72799_c(p_77875_8_, p_77875_9_, p_77875_10_)
        && p_77875_1_.func_72803_f(p_77875_8_, p_77875_9_, p_77875_10_).func_76220_a()) {
      return false;
    } else {
      if (p_77875_1_.field_73011_w.field_76575_d
          && this.field_77876_a == Block.field_71942_A.field_71990_ca) {
        p_77875_1_.func_72908_a(
            p_77875_2_ + 0.5D,
            p_77875_4_ + 0.5D,
            p_77875_6_ + 0.5D,
            "random.fizz",
            0.5F,
            2.6F
                + (p_77875_1_.field_73012_v.nextFloat() - p_77875_1_.field_73012_v.nextFloat())
                    * 0.8F);

        for (int var11 = 0; var11 < 8; ++var11) {
          p_77875_1_.func_72869_a(
              "largesmoke",
              (double) p_77875_8_ + Math.random(),
              (double) p_77875_9_ + Math.random(),
              (double) p_77875_10_ + Math.random(),
              0.0D,
              0.0D,
              0.0D);
        }
      } else {
        p_77875_1_.func_72832_d(p_77875_8_, p_77875_9_, p_77875_10_, this.field_77876_a, 0);
      }

      return true;
    }
  }
Example #5
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_2_.func_71031_e(p_77648_4_, p_77648_5_, p_77648_6_)) {
     return false;
   } else {
     int var11 = p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_, p_77648_6_);
     int var12 = p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_ + 1, p_77648_6_);
     if ((p_77648_7_ == 0 || var12 != 0 || var11 != Block.field_71980_u.field_71990_ca)
         && var11 != Block.field_71979_v.field_71990_ca) {
       return false;
     } else {
       Block var13 = Block.field_72050_aA;
       p_77648_3_.func_72908_a(
           (double) ((float) p_77648_4_ + 0.5F),
           (double) ((float) p_77648_5_ + 0.5F),
           (double) ((float) p_77648_6_ + 0.5F),
           var13.field_72020_cn.func_72675_d(),
           (var13.field_72020_cn.func_72677_b() + 1.0F) / 2.0F,
           var13.field_72020_cn.func_72678_c() * 0.8F);
       if (p_77648_3_.field_72995_K) {
         return true;
       } else {
         p_77648_3_.func_72859_e(p_77648_4_, p_77648_5_, p_77648_6_, var13.field_71990_ca);
         p_77648_1_.func_77972_a(1, p_77648_2_);
         return true;
       }
     }
   }
 }
Example #6
0
 public void func_71847_b(
     World p_71847_1_, int p_71847_2_, int p_71847_3_, int p_71847_4_, Random p_71847_5_) {
   if (!p_71847_1_.field_72995_K) {
     int var6 = p_71847_1_.func_72805_g(p_71847_2_, p_71847_3_, p_71847_4_);
     if ((var6 & 8) != 0) {
       if (this.field_82537_a) {
         this.func_82535_o(p_71847_1_, p_71847_2_, p_71847_3_, p_71847_4_);
       } else {
         p_71847_1_.func_72921_c(p_71847_2_, p_71847_3_, p_71847_4_, var6 & 7, 3);
         int var7 = var6 & 7;
         this.func_82536_d(p_71847_1_, p_71847_2_, p_71847_3_, p_71847_4_, var7);
         p_71847_1_.func_72908_a(
             (double) p_71847_2_ + 0.5D,
             (double) p_71847_3_ + 0.5D,
             (double) p_71847_4_ + 0.5D,
             "random.click",
             0.3F,
             0.5F);
         p_71847_1_.func_72909_d(
             p_71847_2_, p_71847_3_, p_71847_4_, p_71847_2_, p_71847_3_, p_71847_4_);
       }
     }
   }
 }
Example #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_) {
    int var11 = p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_, p_77648_6_);
    if (var11 == Block.field_72037_aS.field_71990_ca) {
      p_77648_7_ = 1;
    } else if (var11 != Block.field_71998_bu.field_71990_ca
        && var11 != Block.field_71962_X.field_71990_ca
        && var11 != Block.field_71961_Y.field_71990_ca) {
      if (p_77648_7_ == 0) {
        --p_77648_5_;
      }

      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_1_.field_77994_a == 0) {
      return false;
    } else if (!p_77648_2_.func_71031_e(p_77648_4_, p_77648_5_, p_77648_6_)) {
      return false;
    } else if (p_77648_5_ == 255
        && Block.field_71973_m[this.field_77885_a].field_72018_cp.func_76220_a()) {
      return false;
    } else if (p_77648_3_.func_72931_a(
        this.field_77885_a, p_77648_4_, p_77648_5_, p_77648_6_, false, p_77648_7_, p_77648_2_)) {
      Block var12 = Block.field_71973_m[this.field_77885_a];
      if (p_77648_3_.func_72832_d(
          p_77648_4_,
          p_77648_5_,
          p_77648_6_,
          this.field_77885_a,
          this.func_77647_b(p_77648_1_.func_77960_j()))) {
        if (p_77648_3_.func_72798_a(p_77648_4_, p_77648_5_, p_77648_6_) == this.field_77885_a) {
          Block.field_71973_m[this.field_77885_a].func_71909_a(
              p_77648_3_,
              p_77648_4_,
              p_77648_5_,
              p_77648_6_,
              p_77648_7_,
              p_77648_8_,
              p_77648_9_,
              p_77648_10_);
          Block.field_71973_m[this.field_77885_a].func_71860_a(
              p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_2_);
        }

        p_77648_3_.func_72908_a(
            (double) ((float) p_77648_4_ + 0.5F),
            (double) ((float) p_77648_5_ + 0.5F),
            (double) ((float) p_77648_6_ + 0.5F),
            var12.field_72020_cn.func_72675_d(),
            (var12.field_72020_cn.func_72677_b() + 1.0F) / 2.0F,
            var12.field_72020_cn.func_72678_c() * 0.8F);
        --p_77648_1_.field_77994_a;
      }

      return true;
    } else {
      return false;
    }
  }