示例#1
0
  public void b(World var1, BlockPosition var2, IBlockData var3, Random var4) {
    super.b(var1, var2, var3, var4);
    if (var1.worldProvider.d()
        && var1.getGameRules().getBoolean("doMobSpawning")
        && var4.nextInt(2000) < var1.getDifficulty().a()) {
      int var5 = var2.getY();

      BlockPosition var6;
      for (var6 = var2;
          !World.a((IBlockAccess) var1, (BlockPosition) var6) && var6.getY() > 0;
          var6 = var6.down()) {;
      }

      if (var5 > 0 && !var1.getType(var6.up()).getBlock().isOccluding()) {
        Entity var7 =
            ItemMonsterEgg.a(
                var1,
                57,
                (double) var6.getX() + 0.5D,
                (double) var6.getY() + 1.1D,
                (double) var6.getZ() + 0.5D);
        if (var7 != null) {
          var7.portalCooldown = var7.aq();
        }
      }
    }
  }
示例#2
0
  public void b(World var1, BlockPosition var2, IBlockData var3, Random var4) {
    if (this.material == Material.LAVA) {
      if (var1.getGameRules().getBoolean("doFireTick")) {
        int var5 = var4.nextInt(3);
        if (var5 > 0) {
          BlockPosition var6 = var2;

          for (int var7 = 0; var7 < var5; ++var7) {
            var6 = var6.a(var4.nextInt(3) - 1, 1, var4.nextInt(3) - 1);
            Block var8 = var1.getType(var6).getBlock();
            if (var8.material == Material.AIR) {
              if (this.f(var1, var6)) {
                var1.setTypeUpdate(var6, Blocks.FIRE.getBlockData());
                return;
              }
            } else if (var8.material.isSolid()) {
              return;
            }
          }
        } else {
          for (int var9 = 0; var9 < 3; ++var9) {
            BlockPosition var10 = var2.a(var4.nextInt(3) - 1, 0, var4.nextInt(3) - 1);
            if (var1.isEmpty(var10.up()) && this.m(var1, var10)) {
              var1.setTypeUpdate(var10.up(), Blocks.FIRE.getBlockData());
            }
          }
        }
      }
    }
  }