Exemplo n.º 1
0
  protected boolean func_74869_a(
      World p_74869_1_,
      StructureBoundingBox p_74869_2_,
      Random p_74869_3_,
      int p_74869_4_,
      int p_74869_5_,
      int p_74869_6_,
      int p_74869_7_,
      WeightedRandomChestContent[] p_74869_8_,
      int p_74869_9_) {
    int var10 = this.func_74865_a(p_74869_4_, p_74869_6_);
    int var11 = this.func_74862_a(p_74869_5_);
    int var12 = this.func_74873_b(p_74869_4_, p_74869_6_);
    if (p_74869_2_.func_78890_b(var10, var11, var12)
        && p_74869_1_.func_72798_a(var10, var11, var12) != Block.field_71958_P.field_71990_ca) {
      p_74869_1_.func_72832_d(
          var10,
          var11,
          var12,
          Block.field_71958_P.field_71990_ca,
          this.func_74863_c(Block.field_71958_P.field_71990_ca, p_74869_7_),
          2);
      TileEntityDispenser var13 =
          (TileEntityDispenser) p_74869_1_.func_72796_p(var10, var11, var12);
      if (var13 != null) {
        WeightedRandomChestContent.func_76294_a(p_74869_3_, p_74869_8_, var13, p_74869_9_);
      }

      return true;
    } else {
      return false;
    }
  }
Exemplo n.º 2
0
  public boolean func_72246_i_(World p_72246_1_, int p_72246_2_, int p_72246_3_, int p_72246_4_) {
    byte var5 = 0;
    byte var6 = 0;
    if (p_72246_1_.func_72798_a(p_72246_2_ - 1, p_72246_3_, p_72246_4_)
            == Block.field_72089_ap.field_71990_ca
        || p_72246_1_.func_72798_a(p_72246_2_ + 1, p_72246_3_, p_72246_4_)
            == Block.field_72089_ap.field_71990_ca) {
      var5 = 1;
    }

    if (p_72246_1_.func_72798_a(p_72246_2_, p_72246_3_, p_72246_4_ - 1)
            == Block.field_72089_ap.field_71990_ca
        || p_72246_1_.func_72798_a(p_72246_2_, p_72246_3_, p_72246_4_ + 1)
            == Block.field_72089_ap.field_71990_ca) {
      var6 = 1;
    }

    if (var5 == var6) {
      return false;
    } else {
      if (p_72246_1_.func_72798_a(p_72246_2_ - var5, p_72246_3_, p_72246_4_ - var6) == 0) {
        p_72246_2_ -= var5;
        p_72246_4_ -= var6;
      }

      int var7;
      int var8;
      for (var7 = -1; var7 <= 2; ++var7) {
        for (var8 = -1; var8 <= 3; ++var8) {
          boolean var9 = var7 == -1 || var7 == 2 || var8 == -1 || var8 == 3;
          if (var7 != -1 && var7 != 2 || var8 != -1 && var8 != 3) {
            int var10 =
                p_72246_1_.func_72798_a(
                    p_72246_2_ + var5 * var7, p_72246_3_ + var8, p_72246_4_ + var6 * var7);
            if (var9) {
              if (var10 != Block.field_72089_ap.field_71990_ca) {
                return false;
              }
            } else if (var10 != 0 && var10 != Block.field_72067_ar.field_71990_ca) {
              return false;
            }
          }
        }
      }

      for (var7 = 0; var7 < 2; ++var7) {
        for (var8 = 0; var8 < 3; ++var8) {
          p_72246_1_.func_72832_d(
              p_72246_2_ + var5 * var7,
              p_72246_3_ + var8,
              p_72246_4_ + var6 * var7,
              Block.field_72015_be.field_71990_ca,
              0,
              2);
        }
      }

      return true;
    }
  }
Exemplo n.º 3
0
  protected boolean func_74879_a(
      World p_74879_1_,
      StructureBoundingBox p_74879_2_,
      Random p_74879_3_,
      int p_74879_4_,
      int p_74879_5_,
      int p_74879_6_,
      WeightedRandomChestContent[] p_74879_7_,
      int p_74879_8_) {
    int var9 = this.func_74865_a(p_74879_4_, p_74879_6_);
    int var10 = this.func_74862_a(p_74879_5_);
    int var11 = this.func_74873_b(p_74879_4_, p_74879_6_);
    if (p_74879_2_.func_78890_b(var9, var10, var11)
        && p_74879_1_.func_72798_a(var9, var10, var11) != Block.field_72077_au.field_71990_ca) {
      p_74879_1_.func_72832_d(var9, var10, var11, Block.field_72077_au.field_71990_ca, 0, 2);
      TileEntityChest var12 = (TileEntityChest) p_74879_1_.func_72796_p(var9, var10, var11);
      if (var12 != null) {
        WeightedRandomChestContent.func_76293_a(p_74879_3_, p_74879_7_, var12, p_74879_8_);
      }

      return true;
    } else {
      return false;
    }
  }
Exemplo n.º 4
0
 protected void func_74864_a(
     World p_74864_1_,
     int p_74864_2_,
     int p_74864_3_,
     int p_74864_4_,
     int p_74864_5_,
     int p_74864_6_,
     StructureBoundingBox p_74864_7_) {
   int var8 = this.func_74865_a(p_74864_4_, p_74864_6_);
   int var9 = this.func_74862_a(p_74864_5_);
   int var10 = this.func_74873_b(p_74864_4_, p_74864_6_);
   if (p_74864_7_.func_78890_b(var8, var9, var10)) {
     p_74864_1_.func_72832_d(var8, var9, var10, p_74864_2_, p_74864_3_, 2);
   }
 }
Exemplo n.º 5
0
 protected void func_74871_b(
     World p_74871_1_,
     int p_74871_2_,
     int p_74871_3_,
     int p_74871_4_,
     StructureBoundingBox p_74871_5_) {
   int var6 = this.func_74865_a(p_74871_2_, p_74871_4_);
   int var7 = this.func_74862_a(p_74871_3_);
   int var8 = this.func_74873_b(p_74871_2_, p_74871_4_);
   if (p_74871_5_.func_78890_b(var6, var7, var8)) {
     while (!p_74871_1_.func_72799_c(var6, var7, var8) && var7 < 255) {
       p_74871_1_.func_72832_d(var6, var7, var8, 0, 0, 2);
       ++var7;
     }
   }
 }
Exemplo n.º 6
0
  public boolean func_76484_a(
      World p_76484_1_, Random p_76484_2_, int p_76484_3_, int p_76484_4_, int p_76484_5_) {
    for (int var6 = 0; var6 < 64; ++var6) {
      int var7 = p_76484_3_ + p_76484_2_.nextInt(8) - p_76484_2_.nextInt(8);
      int var8 = p_76484_4_ + p_76484_2_.nextInt(4) - p_76484_2_.nextInt(4);
      int var9 = p_76484_5_ + p_76484_2_.nextInt(8) - p_76484_2_.nextInt(8);
      if (p_76484_1_.func_72799_c(var7, var8, var9)
          && p_76484_1_.func_72798_a(var7, var8 - 1, var9) == Block.field_71980_u.field_71990_ca
          && Block.field_72061_ba.func_71930_b(p_76484_1_, var7, var8, var9)) {
        p_76484_1_.func_72832_d(
            var7, var8, var9, Block.field_72061_ba.field_71990_ca, p_76484_2_.nextInt(4), 2);
      }
    }

    return true;
  }
Exemplo n.º 7
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;
     }
   }
 }
Exemplo n.º 8
0
  public void func_76728_a(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) {
    super.func_76728_a(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_);
    int var5 = 3 + p_76728_2_.nextInt(6);

    int var6;
    int var7;
    int var8;
    for (var6 = 0; var6 < var5; ++var6) {
      var7 = p_76728_3_ + p_76728_2_.nextInt(16);
      var8 = p_76728_2_.nextInt(28) + 4;
      int var9 = p_76728_4_ + p_76728_2_.nextInt(16);
      int var10 = p_76728_1_.func_72798_a(var7, var8, var9);
      if (var10 == Block.field_71981_t.field_71990_ca) {
        p_76728_1_.func_72832_d(var7, var8, var9, Block.field_72068_bR.field_71990_ca, 0, 2);
      }
    }

    for (var5 = 0; var5 < 7; ++var5) {
      var6 = p_76728_3_ + p_76728_2_.nextInt(16);
      var7 = p_76728_2_.nextInt(64);
      var8 = p_76728_4_ + p_76728_2_.nextInt(16);
      this.field_82915_S.func_76484_a(p_76728_1_, p_76728_2_, var6, var7, var8);
    }
  }
Exemplo n.º 9
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;
      }
    }
  }
Exemplo n.º 10
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;
      }
    }
  }