public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) {
    if (this.h < 0) {
      this.h = this.b(world, structureboundingbox);
      if (this.h < 0) {
        return true;
      }

      this.l.a(0, this.h - this.l.e + 3, 0);
    }

    this.a(
        world,
        structureboundingbox,
        1,
        0,
        1,
        4,
        12,
        4,
        Blocks.COBBLESTONE.getBlockData(),
        Blocks.FLOWING_WATER.getBlockData(),
        false);
    this.a(world, Blocks.AIR.getBlockData(), 2, 12, 2, structureboundingbox);
    this.a(world, Blocks.AIR.getBlockData(), 3, 12, 2, structureboundingbox);
    this.a(world, Blocks.AIR.getBlockData(), 2, 12, 3, structureboundingbox);
    this.a(world, Blocks.AIR.getBlockData(), 3, 12, 3, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 1, 13, 1, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 1, 14, 1, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 4, 13, 1, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 4, 14, 1, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 1, 13, 4, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 1, 14, 4, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 4, 13, 4, structureboundingbox);
    this.a(world, Blocks.FENCE.getBlockData(), 4, 14, 4, structureboundingbox);
    this.a(
        world,
        structureboundingbox,
        1,
        15,
        1,
        4,
        15,
        4,
        Blocks.COBBLESTONE.getBlockData(),
        Blocks.COBBLESTONE.getBlockData(),
        false);

    for (int i = 0; i <= 5; ++i) {
      for (int j = 0; j <= 5; ++j) {
        if (j == 0 || j == 5 || i == 0 || i == 5) {
          this.a(world, Blocks.GRAVEL.getBlockData(), j, 11, i, structureboundingbox);
          this.b(world, j, 12, i, structureboundingbox);
        }
      }
    }

    return true;
  }
  public boolean interact(
      World world,
      BlockPosition blockposition,
      IBlockData iblockdata,
      EntityHuman entityhuman,
      EnumHand enumhand,
      EnumDirection enumdirection,
      float f,
      float f1,
      float f2) {
    ItemStack itemstack = entityhuman.b(enumhand);

    if (!itemstack.isEmpty()
        && (itemstack.getItem() == Items.FLINT_AND_STEEL
            || itemstack.getItem() == Items.FIRE_CHARGE)) {
      this.a(
          world,
          blockposition,
          iblockdata.set(BlockTNT.EXPLODE, Boolean.valueOf(true)),
          (EntityLiving) entityhuman);
      world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 11);
      if (itemstack.getItem() == Items.FLINT_AND_STEEL) {
        itemstack.damage(1, entityhuman);
      } else if (!entityhuman.abilities.canInstantlyBuild) {
        itemstack.subtract(1);
      }

      return true;
    } else {
      return super.interact(
          world, blockposition, iblockdata, entityhuman, enumhand, enumdirection, f, f1, f2);
    }
  }
  public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) {
    this.a(
        world,
        structureboundingbox,
        0,
        0,
        0,
        8,
        1,
        8,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        2,
        0,
        8,
        5,
        8,
        Blocks.AIR.getBlockData(),
        Blocks.AIR.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        6,
        0,
        8,
        6,
        5,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        2,
        0,
        2,
        5,
        0,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        6,
        2,
        0,
        8,
        5,
        0,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        3,
        0,
        1,
        4,
        0,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        7,
        3,
        0,
        7,
        4,
        0,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        2,
        4,
        8,
        2,
        8,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        1,
        4,
        2,
        2,
        4,
        Blocks.AIR.getBlockData(),
        Blocks.AIR.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        6,
        1,
        4,
        7,
        2,
        4,
        Blocks.AIR.getBlockData(),
        Blocks.AIR.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        3,
        8,
        8,
        3,
        8,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        3,
        6,
        0,
        3,
        7,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        8,
        3,
        6,
        8,
        3,
        7,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        3,
        4,
        0,
        5,
        5,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        8,
        3,
        4,
        8,
        5,
        5,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        3,
        5,
        2,
        5,
        5,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        6,
        3,
        5,
        7,
        5,
        5,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        4,
        5,
        1,
        5,
        5,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        7,
        4,
        5,
        7,
        5,
        5,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);

    for (int i = 0; i <= 5; ++i) {
      for (int j = 0; j <= 8; ++j) {
        this.b(world, Blocks.NETHER_BRICK.getBlockData(), j, -1, i, structureboundingbox);
      }
    }

    return true;
  }
  public boolean a(World var1, Random var2, CuboidArea var3) {
    this.a(
        var1,
        var3,
        7,
        3,
        0,
        11,
        4,
        18,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        0,
        3,
        7,
        18,
        4,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        8,
        5,
        0,
        10,
        7,
        18,
        Blocks.AIR.getBlockState(),
        Blocks.AIR.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        0,
        5,
        8,
        18,
        7,
        10,
        Blocks.AIR.getBlockState(),
        Blocks.AIR.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        5,
        0,
        7,
        5,
        7,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        5,
        11,
        7,
        5,
        18,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        11,
        5,
        0,
        11,
        5,
        7,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        11,
        5,
        11,
        11,
        5,
        18,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        0,
        5,
        7,
        7,
        5,
        7,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        11,
        5,
        7,
        18,
        5,
        7,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        0,
        5,
        11,
        7,
        5,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        11,
        5,
        11,
        18,
        5,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        2,
        0,
        11,
        2,
        5,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        2,
        13,
        11,
        2,
        18,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        0,
        0,
        11,
        1,
        3,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        7,
        0,
        15,
        11,
        1,
        18,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);

    int var4;
    int var5;
    for (var4 = 7; var4 <= 11; ++var4) {
      for (var5 = 0; var5 <= 2; ++var5) {
        this.b(var1, Blocks.NETHER_BRICK.getBlockState(), var4, -1, var5, var3);
        this.b(var1, Blocks.NETHER_BRICK.getBlockState(), var4, -1, 18 - var5, var3);
      }
    }

    this.a(
        var1,
        var3,
        0,
        2,
        7,
        5,
        2,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        13,
        2,
        7,
        18,
        2,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        0,
        0,
        7,
        3,
        1,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);
    this.a(
        var1,
        var3,
        15,
        0,
        7,
        18,
        1,
        11,
        Blocks.NETHER_BRICK.getBlockState(),
        Blocks.NETHER_BRICK.getBlockState(),
        false);

    for (var4 = 0; var4 <= 2; ++var4) {
      for (var5 = 7; var5 <= 11; ++var5) {
        this.b(var1, Blocks.NETHER_BRICK.getBlockState(), var4, -1, var5, var3);
        this.b(var1, Blocks.NETHER_BRICK.getBlockState(), 18 - var4, -1, var5, var3);
      }
    }

    return true;
  }
Exemple #5
0
  public void a(boolean flag) {
    this.world.makeSound(
        this.posX,
        this.posY,
        this.posZ,
        "random.explode",
        4.0F,
        (1.0F + (this.world.random.nextFloat() - this.world.random.nextFloat()) * 0.2F) * 0.7F);
    if (this.size >= 2.0F && this.b) {
      this.world.addParticle(
          EnumParticle.EXPLOSION_HUGE,
          this.posX,
          this.posY,
          this.posZ,
          1.0D,
          0.0D,
          0.0D,
          new int[0]);
    } else {
      this.world.addParticle(
          EnumParticle.EXPLOSION_LARGE,
          this.posX,
          this.posY,
          this.posZ,
          1.0D,
          0.0D,
          0.0D,
          new int[0]);
    }

    Iterator iterator;
    BlockPosition blockposition;

    if (this.b) {
      // CraftBukkit start
      org.bukkit.World bworld = this.world.getWorld();
      org.bukkit.entity.Entity explode = this.source == null ? null : this.source.getBukkitEntity();
      Location location = new Location(bworld, this.posX, this.posY, this.posZ);

      List<org.bukkit.block.Block> blockList = Lists.newArrayList();
      for (int i1 = this.blocks.size() - 1; i1 >= 0; i1--) {
        BlockPosition cpos = (BlockPosition) this.blocks.get(i1);
        org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ());
        if (bblock.getType() != org.bukkit.Material.AIR) {
          blockList.add(bblock);
        }
      }

      boolean cancelled;
      List<org.bukkit.block.Block> bukkitBlocks;
      float yield;

      if (explode != null) {
        EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, 0.3F);
        this.world.getServer().getPluginManager().callEvent(event);
        cancelled = event.isCancelled();
        bukkitBlocks = event.blockList();
        yield = event.getYield();
      } else {
        BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, 0.3F);
        this.world.getServer().getPluginManager().callEvent(event);
        cancelled = event.isCancelled();
        bukkitBlocks = event.blockList();
        yield = event.getYield();
      }

      this.blocks.clear();

      for (org.bukkit.block.Block bblock : bukkitBlocks) {
        BlockPosition coords = new BlockPosition(bblock.getX(), bblock.getY(), bblock.getZ());
        blocks.add(coords);
      }

      if (cancelled) {
        this.wasCanceled = true;
        return;
      }
      // CraftBukkit end
      iterator = this.blocks.iterator();

      while (iterator.hasNext()) {
        blockposition = (BlockPosition) iterator.next();
        Block block = this.world.getType(blockposition).getBlock();

        world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
        if (flag) {
          double d0 = (double) ((float) blockposition.getX() + this.world.random.nextFloat());
          double d1 = (double) ((float) blockposition.getY() + this.world.random.nextFloat());
          double d2 = (double) ((float) blockposition.getZ() + this.world.random.nextFloat());
          double d3 = d0 - this.posX;
          double d4 = d1 - this.posY;
          double d5 = d2 - this.posZ;
          double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);

          d3 /= d6;
          d4 /= d6;
          d5 /= d6;
          double d7 = 0.5D / (d6 / (double) this.size + 0.1D);

          d7 *= (double) (this.world.random.nextFloat() * this.world.random.nextFloat() + 0.3F);
          d3 *= d7;
          d4 *= d7;
          d5 *= d7;
          this.world.addParticle(
              EnumParticle.EXPLOSION_NORMAL,
              (d0 + this.posX * 1.0D) / 2.0D,
              (d1 + this.posY * 1.0D) / 2.0D,
              (d2 + this.posZ * 1.0D) / 2.0D,
              d3,
              d4,
              d5,
              new int[0]);
          this.world.addParticle(EnumParticle.SMOKE_NORMAL, d0, d1, d2, d3, d4, d5, new int[0]);
        }

        if (block.getMaterial() != Material.AIR) {
          if (block.a(this)) {
            // CraftBukkit - add yield
            block.dropNaturally(
                this.world, blockposition, this.world.getType(blockposition), yield, 0);
          }

          this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3);
          block.wasExploded(this.world, blockposition, this);
        }
      }
    }

    if (this.a) {
      iterator = this.blocks.iterator();

      while (iterator.hasNext()) {
        blockposition = (BlockPosition) iterator.next();
        if (this.world.getType(blockposition).getBlock().getMaterial() == Material.AIR
            && this.world.getType(blockposition.down()).getBlock().o()
            && this.c.nextInt(3) == 0) {
          // CraftBukkit start - Ignition by explosion
          if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(
                  this.world,
                  blockposition.getX(),
                  blockposition.getY(),
                  blockposition.getZ(),
                  this)
              .isCancelled()) {
            this.world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData());
          }
          // CraftBukkit end
        }
      }
    }
  }
  public boolean a(World world, Random random, StructureBoundingBox structureboundingbox) {
    this.a(
        world,
        structureboundingbox,
        0,
        0,
        0,
        4,
        1,
        4,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        2,
        0,
        4,
        5,
        4,
        Blocks.AIR.getBlockData(),
        Blocks.AIR.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        2,
        0,
        0,
        5,
        4,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        3,
        1,
        0,
        4,
        1,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        0,
        3,
        3,
        0,
        4,
        3,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        4,
        2,
        0,
        4,
        5,
        0,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        2,
        4,
        4,
        5,
        4,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        1,
        3,
        4,
        1,
        4,
        4,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    this.a(
        world,
        structureboundingbox,
        3,
        3,
        4,
        3,
        4,
        4,
        Blocks.NETHER_BRICK_FENCE.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);
    if (this.b
        && structureboundingbox.b(
            (BaseBlockPosition) (new BlockPosition(this.a(1, 3), this.d(2), this.b(1, 3))))) {
      this.b = false;
      this.a(
          world,
          structureboundingbox,
          random,
          1,
          2,
          3,
          WorldGenNetherPiece10.a,
          2 + random.nextInt(4));
    }

    this.a(
        world,
        structureboundingbox,
        0,
        6,
        0,
        4,
        6,
        4,
        Blocks.NETHER_BRICK.getBlockData(),
        Blocks.NETHER_BRICK.getBlockData(),
        false);

    for (int i = 0; i <= 4; ++i) {
      for (int j = 0; j <= 4; ++j) {
        this.b(world, Blocks.NETHER_BRICK.getBlockData(), i, -1, j, structureboundingbox);
      }
    }

    return true;
  }
  @Override
  public void execute(ICommandListener var1, String[] var2) throws class_bz {
    if (var2.length < 9) {
      throw new class_cf("commands.clone.usage", new Object[0]);
    } else {
      var1.a(class_n.class_a_in_class_n.b, 0);
      class_cj var3 = a(var1, var2, 0, false);
      class_cj var4 = a(var1, var2, 3, false);
      class_cj var5 = a(var1, var2, 6, false);
      class_aua var6 = new class_aua(var3, var4);
      class_aua var7 = new class_aua(var5, var5.a(var6.b()));
      int var8 = var6.c() * var6.d() * var6.e();
      if (var8 > '耀') {
        throw new class_bz(
            "commands.clone.tooManyBlocks",
            new Object[] {Integer.valueOf(var8), Integer.valueOf('耀')});
      } else {
        boolean var9 = false;
        Block var10 = null;
        int var11 = -1;
        if (((var2.length < 11) || (!var2[10].equals("force") && !var2[10].equals("move")))
            && var6.a(var7)) {
          throw new class_bz("commands.clone.noOverlap", new Object[0]);
        } else {
          if ((var2.length >= 11) && var2[10].equals("move")) {
            var9 = true;
          }

          if ((var6.b >= 0) && (var6.e < 256) && (var7.b >= 0) && (var7.e < 256)) {
            class_ago var12 = var1.e();
            if (var12.a(var6) && var12.a(var7)) {
              boolean var13 = false;
              if (var2.length >= 10) {
                if (var2[9].equals("masked")) {
                  var13 = true;
                } else if (var2[9].equals("filtered")) {
                  if (var2.length < 12) {
                    throw new class_cf("commands.clone.usage", new Object[0]);
                  }

                  var10 = g(var1, var2[11]);
                  if (var2.length >= 13) {
                    var11 = a(var2[12], 0, 15);
                  }
                }
              }

              ArrayList var14 = Lists.newArrayList();
              ArrayList var15 = Lists.newArrayList();
              ArrayList var16 = Lists.newArrayList();
              LinkedList var17 = Lists.newLinkedList();
              class_cj var18 = new class_cj(var7.a - var6.a, var7.b - var6.b, var7.c - var6.c);

              for (int var19 = var6.c; var19 <= var6.f; ++var19) {
                for (int var20 = var6.b; var20 <= var6.e; ++var20) {
                  for (int var21 = var6.a; var21 <= var6.d; ++var21) {
                    class_cj var22 = new class_cj(var21, var20, var19);
                    class_cj var23 = var22.a(var18);
                    class_apn var24 = var12.p(var22);
                    if ((!var13 || (var24.c() != Blocks.AIR))
                        && ((var10 == null)
                            || ((var24.c() == var10)
                                && ((var11 < 0) || (var24.c().c(var24) == var11))))) {
                      TileEntity var25 = var12.s(var22);
                      if (var25 != null) {
                        class_dn var26 = new class_dn();
                        var25.b(var26);
                        var15.add(new class_u.class_a_in_class_u(var23, var24, var26));
                        var17.addLast(var22);
                      } else if (!var24.c().q() && !var24.c().d()) {
                        var16.add(new class_u.class_a_in_class_u(var23, var24, (class_dn) null));
                        var17.addFirst(var22);
                      } else {
                        var14.add(new class_u.class_a_in_class_u(var23, var24, (class_dn) null));
                        var17.addLast(var22);
                      }
                    }
                  }
                }
              }

              if (var9) {
                Iterator var27;
                class_cj var29;
                for (var27 = var17.iterator();
                    var27.hasNext();
                    var12.a(var29, Blocks.BARRIER.getBlockData(), 2)) {
                  var29 = (class_cj) var27.next();
                  TileEntity var31 = var12.s(var29);
                  if (var31 instanceof class_pp) {
                    ((class_pp) var31).l();
                  }
                }

                var27 = var17.iterator();

                while (var27.hasNext()) {
                  var29 = (class_cj) var27.next();
                  var12.a(var29, Blocks.AIR.getBlockData(), 3);
                }
              }

              ArrayList var28 = Lists.newArrayList();
              var28.addAll(var14);
              var28.addAll(var15);
              var28.addAll(var16);
              List var30 = Lists.reverse(var28);

              Iterator var32;
              class_u.class_a_in_class_u var33;
              TileEntity var34;
              for (var32 = var30.iterator();
                  var32.hasNext();
                  var12.a(var33.a, Blocks.BARRIER.getBlockData(), 2)) {
                var33 = (class_u.class_a_in_class_u) var32.next();
                var34 = var12.s(var33.a);
                if (var34 instanceof class_pp) {
                  ((class_pp) var34).l();
                }
              }

              var8 = 0;
              var32 = var28.iterator();

              while (var32.hasNext()) {
                var33 = (class_u.class_a_in_class_u) var32.next();
                if (var12.a(var33.a, var33.b, 2)) {
                  ++var8;
                }
              }

              for (var32 = var15.iterator(); var32.hasNext(); var12.a(var33.a, var33.b, 2)) {
                var33 = (class_u.class_a_in_class_u) var32.next();
                var34 = var12.s(var33.a);
                if ((var33.c != null) && (var34 != null)) {
                  var33.c.a("x", var33.a.n());
                  var33.c.a("y", var33.a.o());
                  var33.c.a("z", var33.a.p());
                  var34.a(var33.c);
                  var34.o_();
                }
              }

              var32 = var30.iterator();

              while (var32.hasNext()) {
                var33 = (class_u.class_a_in_class_u) var32.next();
                var12.c(var33.a, var33.b.c());
              }

              List var35 = var12.a(var6, false);
              if (var35 != null) {
                Iterator var36 = var35.iterator();

                while (var36.hasNext()) {
                  class_agz var37 = (class_agz) var36.next();
                  if (var6.b(var37.a)) {
                    class_cj var38 = var37.a.a(var18);
                    var12.b(var38, var37.a(), (int) (var37.b - var12.R().e()), var37.c);
                  }
                }
              }

              if (var8 <= 0) {
                throw new class_bz("commands.clone.failed", new Object[0]);
              } else {
                var1.a(class_n.class_a_in_class_n.b, var8);
                a(var1, this, "commands.clone.success", new Object[] {Integer.valueOf(var8)});
              }
            } else {
              throw new class_bz("commands.clone.outOfWorld", new Object[0]);
            }
          } else {
            throw new class_bz("commands.clone.outOfWorld", new Object[0]);
          }
        }
      }
    }
  }