/**
   * 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it
   * closes Mineshafts at the end, it adds Fences...'
   */
  public boolean addComponentParts(
      World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) {
    if (isLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) {
      return false;
    }

    int i = sectionCount * 5 - 1;
    fillWithBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 2, 1, i, 0, 0, false);
    randomlyFillWithBlocks(
        par1World, par3StructureBoundingBox, par2Random, 0.8F, 0, 2, 0, 2, 2, i, 0, 0, false);

    if (hasSpiders) {
      randomlyFillWithBlocks(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.6F,
          0,
          0,
          0,
          2,
          1,
          i,
          Block.web.blockID,
          0,
          false);
    }

    for (int j = 0; j < sectionCount; j++) {
      int i1 = 2 + j * 5;
      fillWithBlocks(
          par1World, par3StructureBoundingBox, 0, 0, i1, 0, 1, i1, Block.fence.blockID, 0, false);
      fillWithBlocks(
          par1World, par3StructureBoundingBox, 2, 0, i1, 2, 1, i1, Block.fence.blockID, 0, false);

      if (par2Random.nextInt(4) != 0) {
        fillWithBlocks(
            par1World,
            par3StructureBoundingBox,
            0,
            2,
            i1,
            2,
            2,
            i1,
            Block.planks.blockID,
            0,
            false);
      } else {
        fillWithBlocks(
            par1World,
            par3StructureBoundingBox,
            0,
            2,
            i1,
            0,
            2,
            i1,
            Block.planks.blockID,
            0,
            false);
        fillWithBlocks(
            par1World,
            par3StructureBoundingBox,
            2,
            2,
            i1,
            2,
            2,
            i1,
            Block.planks.blockID,
            0,
            false);
      }

      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.1F,
          0,
          2,
          i1 - 1,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.1F,
          2,
          2,
          i1 - 1,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.1F,
          0,
          2,
          i1 + 1,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.1F,
          2,
          2,
          i1 + 1,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          0,
          2,
          i1 - 2,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          2,
          2,
          i1 - 2,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          0,
          2,
          i1 + 2,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          2,
          2,
          i1 + 2,
          Block.web.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          1,
          2,
          i1 - 1,
          Block.torchWood.blockID,
          0);
      randomlyPlaceBlock(
          par1World,
          par3StructureBoundingBox,
          par2Random,
          0.05F,
          1,
          2,
          i1 + 1,
          Block.torchWood.blockID,
          0);

      if (par2Random.nextInt(100) == 0) {
        createTreasureChestAtCurrentPosition(
            par1World,
            par3StructureBoundingBox,
            par2Random,
            2,
            0,
            i1 - 1,
            StructureMineshaftPieces.getTreasurePieces(),
            3 + par2Random.nextInt(4));
      }

      if (par2Random.nextInt(100) == 0) {
        createTreasureChestAtCurrentPosition(
            par1World,
            par3StructureBoundingBox,
            par2Random,
            0,
            0,
            i1 + 1,
            StructureMineshaftPieces.getTreasurePieces(),
            3 + par2Random.nextInt(4));
      }

      if (!hasSpiders || spawnerPlaced) {
        continue;
      }

      int l1 = getYWithOffset(0);
      int j2 = (i1 - 1) + par2Random.nextInt(3);
      int k2 = getXWithOffset(1, j2);
      j2 = getZWithOffset(1, j2);

      if (!par3StructureBoundingBox.isVecInside(k2, l1, j2)) {
        continue;
      }

      spawnerPlaced = true;
      par1World.setBlockWithNotify(k2, l1, j2, Block.mobSpawner.blockID);
      TileEntityMobSpawner tileentitymobspawner =
          (TileEntityMobSpawner) par1World.getBlockTileEntity(k2, l1, j2);

      if (tileentitymobspawner != null) {
        tileentitymobspawner.setMobID("CaveSpider");
      }
    }

    for (int k = 0; k <= 2; k++) {
      for (int j1 = 0; j1 <= i; j1++) {
        int i2 = getBlockIdAtCurrentPosition(par1World, k, -1, j1, par3StructureBoundingBox);

        if (i2 == 0) {
          placeBlockAtCurrentPosition(
              par1World, Block.planks.blockID, 0, k, -1, j1, par3StructureBoundingBox);
        }
      }
    }

    if (hasRails) {
      for (int l = 0; l <= i; l++) {
        int k1 = getBlockIdAtCurrentPosition(par1World, 1, -1, l, par3StructureBoundingBox);

        if (k1 > 0 && Block.opaqueCubeLookup[k1]) {
          randomlyPlaceBlock(
              par1World,
              par3StructureBoundingBox,
              par2Random,
              0.7F,
              1,
              0,
              l,
              Block.rail.blockID,
              getMetadataWithOffset(Block.rail.blockID, 0));
        }
      }
    }

    return true;
  }