Esempio n. 1
0
  private void func_72280_l(World p_72280_1_, int p_72280_2_, int p_72280_3_, int p_72280_4_) {
    if (!p_72280_1_.field_72995_K) {
      int var5 = p_72280_1_.func_72798_a(p_72280_2_, p_72280_3_, p_72280_4_ - 1);
      int var6 = p_72280_1_.func_72798_a(p_72280_2_, p_72280_3_, p_72280_4_ + 1);
      int var7 = p_72280_1_.func_72798_a(p_72280_2_ - 1, p_72280_3_, p_72280_4_);
      int var8 = p_72280_1_.func_72798_a(p_72280_2_ + 1, p_72280_3_, p_72280_4_);
      byte var9 = 3;
      if (Block.field_71970_n[var5] && !Block.field_71970_n[var6]) {
        var9 = 3;
      }

      if (Block.field_71970_n[var6] && !Block.field_71970_n[var5]) {
        var9 = 2;
      }

      if (Block.field_71970_n[var7] && !Block.field_71970_n[var8]) {
        var9 = 5;
      }

      if (Block.field_71970_n[var8] && !Block.field_71970_n[var7]) {
        var9 = 4;
      }

      p_72280_1_.func_72921_c(p_72280_2_, p_72280_3_, p_72280_4_, var9, 2);
    }
  }
Esempio n. 2
0
  public void func_71871_a(
      World p_71871_1_,
      int p_71871_2_,
      int p_71871_3_,
      int p_71871_4_,
      AxisAlignedBB p_71871_5_,
      List p_71871_6_,
      Entity p_71871_7_) {
    boolean var8 =
        this.func_72161_e(p_71871_1_.func_72798_a(p_71871_2_, p_71871_3_, p_71871_4_ - 1));
    boolean var9 =
        this.func_72161_e(p_71871_1_.func_72798_a(p_71871_2_, p_71871_3_, p_71871_4_ + 1));
    boolean var10 =
        this.func_72161_e(p_71871_1_.func_72798_a(p_71871_2_ - 1, p_71871_3_, p_71871_4_));
    boolean var11 =
        this.func_72161_e(p_71871_1_.func_72798_a(p_71871_2_ + 1, p_71871_3_, p_71871_4_));
    if ((!var10 || !var11) && (var10 || var11 || var8 || var9)) {
      if (var10 && !var11) {
        this.func_71905_a(0.0F, 0.0F, 0.4375F, 0.5F, 1.0F, 0.5625F);
        super.func_71871_a(
            p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
      } else if (!var10 && var11) {
        this.func_71905_a(0.5F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
        super.func_71871_a(
            p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
      }
    } else {
      this.func_71905_a(0.0F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
      super.func_71871_a(
          p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
    }

    if ((!var8 || !var9) && (var10 || var11 || var8 || var9)) {
      if (var8 && !var9) {
        this.func_71905_a(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 0.5F);
        super.func_71871_a(
            p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
      } else if (!var8 && var9) {
        this.func_71905_a(0.4375F, 0.0F, 0.5F, 0.5625F, 1.0F, 1.0F);
        super.func_71871_a(
            p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
      }
    } else {
      this.func_71905_a(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 1.0F);
      super.func_71871_a(
          p_71871_1_, p_71871_2_, p_71871_3_, p_71871_4_, p_71871_5_, p_71871_6_, p_71871_7_);
    }
  }
  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;
    }
  }
  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;
    }
  }
 public static boolean func_72191_e_(
     World p_72191_0_, int p_72191_1_, int p_72191_2_, int p_72191_3_) {
   int var4 = p_72191_0_.func_72798_a(p_72191_1_, p_72191_2_, p_72191_3_);
   if (var4 == 0) {
     return true;
   } else if (var4 == Block.field_72067_ar.field_71990_ca) {
     return true;
   } else {
     Material var5 = Block.field_71973_m[var4].field_72018_cp;
     return var5 == Material.field_76244_g ? true : var5 == Material.field_76256_h;
   }
 }
Esempio n. 6
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;
    }
  }
 protected int func_74866_a(
     World p_74866_1_,
     int p_74866_2_,
     int p_74866_3_,
     int p_74866_4_,
     StructureBoundingBox p_74866_5_) {
   int var6 = this.func_74865_a(p_74866_2_, p_74866_4_);
   int var7 = this.func_74862_a(p_74866_3_);
   int var8 = this.func_74873_b(p_74866_2_, p_74866_4_);
   return !p_74866_5_.func_78890_b(var6, var7, var8)
       ? 0
       : p_74866_1_.func_72798_a(var6, var7, var8);
 }
Esempio n. 8
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_) {
    if (p_71862_5_.nextInt(100) == 0) {
      p_71862_1_.func_72980_b(
          (double) p_71862_2_ + 0.5D,
          (double) p_71862_3_ + 0.5D,
          (double) p_71862_4_ + 0.5D,
          "portal.portal",
          0.5F,
          p_71862_5_.nextFloat() * 0.4F + 0.8F,
          false);
    }

    for (int var6 = 0; var6 < 4; ++var6) {
      double var7 = (double) ((float) p_71862_2_ + p_71862_5_.nextFloat());
      double var9 = (double) ((float) p_71862_3_ + p_71862_5_.nextFloat());
      double var11 = (double) ((float) p_71862_4_ + p_71862_5_.nextFloat());
      double var13 = 0.0D;
      double var15 = 0.0D;
      double var17 = 0.0D;
      int var19 = p_71862_5_.nextInt(2) * 2 - 1;
      var13 = ((double) p_71862_5_.nextFloat() - 0.5D) * 0.5D;
      var15 = ((double) p_71862_5_.nextFloat() - 0.5D) * 0.5D;
      var17 = ((double) p_71862_5_.nextFloat() - 0.5D) * 0.5D;
      if (p_71862_1_.func_72798_a(p_71862_2_ - 1, p_71862_3_, p_71862_4_) != this.field_71990_ca
          && p_71862_1_.func_72798_a(p_71862_2_ + 1, p_71862_3_, p_71862_4_)
              != this.field_71990_ca) {
        var7 = (double) p_71862_2_ + 0.5D + 0.25D * (double) var19;
        var13 = (double) (p_71862_5_.nextFloat() * 2.0F * (float) var19);
      } else {
        var11 = (double) p_71862_4_ + 0.5D + 0.25D * (double) var19;
        var17 = (double) (p_71862_5_.nextFloat() * 2.0F * (float) var19);
      }

      p_71862_1_.func_72869_a("portal", var7, var9, var11, var13, var15, var17);
    }
  }
  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_);
        }
      }
    }
  }
Esempio n. 10
0
  protected boolean func_74860_a(World p_74860_1_, StructureBoundingBox p_74860_2_) {
    int var3 = Math.max(this.field_74887_e.field_78897_a - 1, p_74860_2_.field_78897_a);
    int var4 = Math.max(this.field_74887_e.field_78895_b - 1, p_74860_2_.field_78895_b);
    int var5 = Math.max(this.field_74887_e.field_78896_c - 1, p_74860_2_.field_78896_c);
    int var6 = Math.min(this.field_74887_e.field_78893_d + 1, p_74860_2_.field_78893_d);
    int var7 = Math.min(this.field_74887_e.field_78894_e + 1, p_74860_2_.field_78894_e);
    int var8 = Math.min(this.field_74887_e.field_78892_f + 1, p_74860_2_.field_78892_f);

    int var9;
    int var10;
    int var11;
    for (var9 = var3; var9 <= var6; ++var9) {
      for (var10 = var5; var10 <= var8; ++var10) {
        var11 = p_74860_1_.func_72798_a(var9, var4, var10);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }

        var11 = p_74860_1_.func_72798_a(var9, var7, var10);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }
      }
    }

    for (var9 = var3; var9 <= var6; ++var9) {
      for (var10 = var4; var10 <= var7; ++var10) {
        var11 = p_74860_1_.func_72798_a(var9, var10, var5);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }

        var11 = p_74860_1_.func_72798_a(var9, var10, var8);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }
      }
    }

    for (var9 = var5; var9 <= var8; ++var9) {
      for (var10 = var4; var10 <= var7; ++var10) {
        var11 = p_74860_1_.func_72798_a(var3, var10, var9);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }

        var11 = p_74860_1_.func_72798_a(var6, var10, var9);
        if (var11 > 0 && Block.field_71973_m[var11].field_72018_cp.func_76224_d()) {
          return true;
        }
      }
    }

    return false;
  }
Esempio n. 11
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;
  }
Esempio n. 12
0
  private boolean func_72248_l(World p_72248_1_, int p_72248_2_, int p_72248_3_, int p_72248_4_) {
    byte var5 = 0;

    for (int var6 = p_72248_2_ - var5; var6 <= p_72248_2_ + var5; ++var6) {
      for (int var7 = p_72248_4_ - var5; var7 <= p_72248_4_ + var5; ++var7) {
        int var8 = p_72248_1_.func_72798_a(var6, p_72248_3_ + 1, var7);
        if (var8 == Block.field_72058_az.field_71990_ca
            || var8 == Block.field_71999_bt.field_71990_ca
            || var8 == Block.field_71996_bs.field_71990_ca
            || var8 == Block.field_82514_ch.field_71990_ca
            || var8 == Block.field_82513_cg.field_71990_ca) {
          return true;
        }
      }
    }

    return false;
  }
Esempio n. 13
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);
    }
  }
Esempio n. 14
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_) {
    byte var6 = 0;
    byte var7 = 1;
    if (p_71863_1_.func_72798_a(p_71863_2_ - 1, p_71863_3_, p_71863_4_) == this.field_71990_ca
        || p_71863_1_.func_72798_a(p_71863_2_ + 1, p_71863_3_, p_71863_4_) == this.field_71990_ca) {
      var6 = 1;
      var7 = 0;
    }

    int var8;
    for (var8 = p_71863_3_;
        p_71863_1_.func_72798_a(p_71863_2_, var8 - 1, p_71863_4_) == this.field_71990_ca;
        --var8) {;
    }

    if (p_71863_1_.func_72798_a(p_71863_2_, var8 - 1, p_71863_4_)
        != Block.field_72089_ap.field_71990_ca) {
      p_71863_1_.func_94571_i(p_71863_2_, p_71863_3_, p_71863_4_);
    } else {
      int var9;
      for (var9 = 1;
          var9 < 4
              && p_71863_1_.func_72798_a(p_71863_2_, var8 + var9, p_71863_4_)
                  == this.field_71990_ca;
          ++var9) {;
      }

      if (var9 == 3
          && p_71863_1_.func_72798_a(p_71863_2_, var8 + var9, p_71863_4_)
              == Block.field_72089_ap.field_71990_ca) {
        boolean var10 =
            p_71863_1_.func_72798_a(p_71863_2_ - 1, p_71863_3_, p_71863_4_) == this.field_71990_ca
                || p_71863_1_.func_72798_a(p_71863_2_ + 1, p_71863_3_, p_71863_4_)
                    == this.field_71990_ca;
        boolean var11 =
            p_71863_1_.func_72798_a(p_71863_2_, p_71863_3_, p_71863_4_ - 1) == this.field_71990_ca
                || p_71863_1_.func_72798_a(p_71863_2_, p_71863_3_, p_71863_4_ + 1)
                    == this.field_71990_ca;
        if (var10 && var11) {
          p_71863_1_.func_94571_i(p_71863_2_, p_71863_3_, p_71863_4_);
        } else {
          if ((p_71863_1_.func_72798_a(p_71863_2_ + var6, p_71863_3_, p_71863_4_ + var7)
                      != Block.field_72089_ap.field_71990_ca
                  || p_71863_1_.func_72798_a(p_71863_2_ - var6, p_71863_3_, p_71863_4_ - var7)
                      != this.field_71990_ca)
              && (p_71863_1_.func_72798_a(p_71863_2_ - var6, p_71863_3_, p_71863_4_ - var7)
                      != Block.field_72089_ap.field_71990_ca
                  || p_71863_1_.func_72798_a(p_71863_2_ + var6, p_71863_3_, p_71863_4_ + var7)
                      != this.field_71990_ca)) {
            p_71863_1_.func_94571_i(p_71863_2_, p_71863_3_, p_71863_4_);
          }
        }
      } else {
        p_71863_1_.func_94571_i(p_71863_2_, p_71863_3_, p_71863_4_);
      }
    }
  }
 public boolean func_71854_d(World p_71854_1_, int p_71854_2_, int p_71854_3_, int p_71854_4_) {
   return this.func_72263_d_(p_71854_1_.func_72798_a(p_71854_2_, p_71854_3_ - 1, p_71854_4_));
 }