    001    package net.minecraft.world.gen.structure;
    002
    003    import java.util.Random;
    004    import net.minecraft.block.Block;
    005    import net.minecraft.block.BlockLever;
    006    import net.minecraft.item.Item;
    007    import net.minecraft.util.WeightedRandomChestContent;
    008    import net.minecraft.world.World;
    009
    010    import net.minecraftforge.common.ChestGenHooks;
    011    import static net.minecraftforge.common.ChestGenHooks.*;
    012
    013    public class ComponentScatteredFeatureJunglePyramid extends ComponentScatteredFeature
    014    {
    015        private boolean field_74947_h;
    016        private boolean field_74948_i;
    017        private boolean field_74945_j;
    018        private boolean field_74946_k;
    019
    020        /** List of Chest contents to be generated in the Jungle Pyramid chests. */
    021        public static final WeightedRandomChestContent[] junglePyramidsChestContents = new WeightedRandomChestContent[] {new WeightedRandomChestContent(Item.diamond.shiftedIndex, 0, 1, 3, 3), new WeightedRandomChestContent(Item.ingotIron.shiftedIndex, 0, 1, 5, 10), new WeightedRandomChestContent(Item.ingotGold.shiftedIndex, 0, 2, 7, 15), new WeightedRandomChestContent(Item.emerald.shiftedIndex, 0, 1, 3, 2), new WeightedRandomChestContent(Item.bone.shiftedIndex, 0, 4, 6, 20), new WeightedRandomChestContent(Item.rottenFlesh.shiftedIndex, 0, 3, 7, 16)};
    022
    023        /**
    024         * List of Dispenser contents to be generated in the Jungle Pyramid dispensers.
    025         */
    026        public static final WeightedRandomChestContent[] junglePyramidsDispenserContents = new WeightedRandomChestContent[] {new WeightedRandomChestContent(Item.arrow.shiftedIndex, 0, 2, 7, 30)};
    027
    028        /** List of random stones to be generated in the Jungle Pyramid. */
    029        private static StructureScatteredFeatureStones junglePyramidsRandomScatteredStones = new StructureScatteredFeatureStones((ComponentScatteredFeaturePieces2)null);
    030
    031        public ComponentScatteredFeatureJunglePyramid(Random par1Random, int par2, int par3)
    032        {
    033            super(par1Random, par2, 64, par3, 12, 10, 15);
    034        }
    035
    036        /**
    037         * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
    038         * the end, it adds Fences...
    039         */
    040        public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox)
    041        {
    042            if (!this.func_74935_a(par1World, par3StructureBoundingBox, 0))
    043            {
    044                return false;
    045            }
    046            else
    047            {
    048                int var4 = this.getMetadataWithOffset(Block.stairCompactCobblestone.blockID, 3);
    049                int var5 = this.getMetadataWithOffset(Block.stairCompactCobblestone.blockID, 2);
    050                int var6 = this.getMetadataWithOffset(Block.stairCompactCobblestone.blockID, 0);
    051                int var7 = this.getMetadataWithOffset(Block.stairCompactCobblestone.blockID, 1);
    052                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, -4, 0, this.scatteredFeatureSizeX - 1, 0, this.scatteredFeatureSizeZ - 1, false, par2Random, junglePyramidsRandomScatteredStones);
    053                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 1, 2, 9, 2, 2, false, par2Random, junglePyramidsRandomScatteredStones);
    054                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 1, 12, 9, 2, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    055                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 1, 3, 2, 2, 11, false, par2Random, junglePyramidsRandomScatteredStones);
    056                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, 1, 3, 9, 2, 11, false, par2Random, junglePyramidsRandomScatteredStones);
    057                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 3, 1, 10, 6, 1, false, par2Random, junglePyramidsRandomScatteredStones);
    058                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 3, 13, 10, 6, 13, false, par2Random, junglePyramidsRandomScatteredStones);
    059                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 3, 2, 1, 6, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    060                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 10, 3, 2, 10, 6, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    061                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 3, 2, 9, 3, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    062                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 6, 2, 9, 6, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    063                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 3, 7, 3, 8, 7, 11, false, par2Random, junglePyramidsRandomScatteredStones);
    064                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 8, 4, 7, 8, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    065                this.fillWithAir(par1World, par3StructureBoundingBox, 3, 1, 3, 8, 2, 11);
    066                this.fillWithAir(par1World, par3StructureBoundingBox, 4, 3, 6, 7, 3, 9);
    067                this.fillWithAir(par1World, par3StructureBoundingBox, 2, 4, 2, 9, 5, 12);
    068                this.fillWithAir(par1World, par3StructureBoundingBox, 4, 6, 5, 7, 6, 9);
    069                this.fillWithAir(par1World, par3StructureBoundingBox, 5, 7, 6, 6, 7, 8);
    070                this.fillWithAir(par1World, par3StructureBoundingBox, 5, 1, 2, 6, 2, 2);
    071                this.fillWithAir(par1World, par3StructureBoundingBox, 5, 2, 12, 6, 2, 12);
    072                this.fillWithAir(par1World, par3StructureBoundingBox, 5, 5, 1, 6, 5, 1);
    073                this.fillWithAir(par1World, par3StructureBoundingBox, 5, 5, 13, 6, 5, 13);
    074                this.placeBlockAtCurrentPosition(par1World, 0, 0, 1, 5, 5, par3StructureBoundingBox);
    075                this.placeBlockAtCurrentPosition(par1World, 0, 0, 10, 5, 5, par3StructureBoundingBox);
    076                this.placeBlockAtCurrentPosition(par1World, 0, 0, 1, 5, 9, par3StructureBoundingBox);
    077                this.placeBlockAtCurrentPosition(par1World, 0, 0, 10, 5, 9, par3StructureBoundingBox);
    078                int var8;
    079
    080                for (var8 = 0; var8 <= 14; var8 += 14)
    081                {
    082                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 4, var8, 2, 5, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    083                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 4, var8, 4, 5, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    084                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 7, 4, var8, 7, 5, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    085                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, 4, var8, 9, 5, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    086                }
    087
    088                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 5, 6, 0, 6, 6, 0, false, par2Random, junglePyramidsRandomScatteredStones);
    089
    090                for (var8 = 0; var8 <= 11; var8 += 11)
    091                {
    092                    for (int var9 = 2; var9 <= 12; var9 += 2)
    093                    {
    094                        this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, var8, 4, var9, var8, 5, var9, false, par2Random, junglePyramidsRandomScatteredStones);
    095                    }
    096
    097                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, var8, 6, 5, var8, 6, 5, false, par2Random, junglePyramidsRandomScatteredStones);
    098                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, var8, 6, 9, var8, 6, 9, false, par2Random, junglePyramidsRandomScatteredStones);
    099                }
    100
    101                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 7, 2, 2, 9, 2, false, par2Random, junglePyramidsRandomScatteredStones);
    102                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, 7, 2, 9, 9, 2, false, par2Random, junglePyramidsRandomScatteredStones);
    103                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, 7, 12, 2, 9, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    104                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, 7, 12, 9, 9, 12, false, par2Random, junglePyramidsRandomScatteredStones);
    105                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 9, 4, 4, 9, 4, false, par2Random, junglePyramidsRandomScatteredStones);
    106                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 7, 9, 4, 7, 9, 4, false, par2Random, junglePyramidsRandomScatteredStones);
    107                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 9, 10, 4, 9, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    108                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 7, 9, 10, 7, 9, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    109                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 5, 9, 7, 6, 9, 7, false, par2Random, junglePyramidsRandomScatteredStones);
    110                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 5, 9, 6, par3StructureBoundingBox);
    111                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 6, 9, 6, par3StructureBoundingBox);
    112                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var5, 5, 9, 8, par3StructureBoundingBox);
    113                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var5, 6, 9, 8, par3StructureBoundingBox);
    114                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 4, 0, 0, par3StructureBoundingBox);
    115                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 5, 0, 0, par3StructureBoundingBox);
    116                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 6, 0, 0, par3StructureBoundingBox);
    117                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 7, 0, 0, par3StructureBoundingBox);
    118                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 4, 1, 8, par3StructureBoundingBox);
    119                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 4, 2, 9, par3StructureBoundingBox);
    120                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 4, 3, 10, par3StructureBoundingBox);
    121                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 7, 1, 8, par3StructureBoundingBox);
    122                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 7, 2, 9, par3StructureBoundingBox);
    123                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var4, 7, 3, 10, par3StructureBoundingBox);
    124                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 9, 4, 1, 9, false, par2Random, junglePyramidsRandomScatteredStones);
    125                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 7, 1, 9, 7, 1, 9, false, par2Random, junglePyramidsRandomScatteredStones);
    126                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 10, 7, 2, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    127                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 5, 4, 5, 6, 4, 5, false, par2Random, junglePyramidsRandomScatteredStones);
    128                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var6, 4, 4, 5, par3StructureBoundingBox);
    129                this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var7, 7, 4, 5, par3StructureBoundingBox);
    130
    131                for (var8 = 0; var8 < 4; ++var8)
    132                {
    133                    this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var5, 5, 0 - var8, 6 + var8, par3StructureBoundingBox);
    134                    this.placeBlockAtCurrentPosition(par1World, Block.stairCompactCobblestone.blockID, var5, 6, 0 - var8, 6 + var8, par3StructureBoundingBox);
    135                    this.fillWithAir(par1World, par3StructureBoundingBox, 5, 0 - var8, 7 + var8, 6, 0 - var8, 9 + var8);
    136                }
    137
    138                this.fillWithAir(par1World, par3StructureBoundingBox, 1, -3, 12, 10, -1, 13);
    139                this.fillWithAir(par1World, par3StructureBoundingBox, 1, -3, 1, 3, -1, 13);
    140                this.fillWithAir(par1World, par3StructureBoundingBox, 1, -3, 1, 9, -1, 5);
    141
    142                for (var8 = 1; var8 <= 13; var8 += 2)
    143                {
    144                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, -3, var8, 1, -2, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    145                }
    146
    147                for (var8 = 2; var8 <= 12; var8 += 2)
    148                {
    149                    this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, -1, var8, 3, -1, var8, false, par2Random, junglePyramidsRandomScatteredStones);
    150                }
    151
    152                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, -2, 1, 5, -2, 1, false, par2Random, junglePyramidsRandomScatteredStones);
    153                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 7, -2, 1, 9, -2, 1, false, par2Random, junglePyramidsRandomScatteredStones);
    154                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 6, -3, 1, 6, -3, 1, false, par2Random, junglePyramidsRandomScatteredStones);
    155                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 6, -1, 1, 6, -1, 1, false, par2Random, junglePyramidsRandomScatteredStones);
    156                this.placeBlockAtCurrentPosition(par1World, Block.tripWireSource.blockID, this.getMetadataWithOffset(Block.tripWireSource.blockID, 3) | 4, 1, -3, 8, par3StructureBoundingBox);
    157                this.placeBlockAtCurrentPosition(par1World, Block.tripWireSource.blockID, this.getMetadataWithOffset(Block.tripWireSource.blockID, 1) | 4, 4, -3, 8, par3StructureBoundingBox);
    158                this.placeBlockAtCurrentPosition(par1World, Block.tripWire.blockID, 4, 2, -3, 8, par3StructureBoundingBox);
    159                this.placeBlockAtCurrentPosition(par1World, Block.tripWire.blockID, 4, 3, -3, 8, par3StructureBoundingBox);
    160                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 7, par3StructureBoundingBox);
    161                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 6, par3StructureBoundingBox);
    162                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 5, par3StructureBoundingBox);
    163                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 4, par3StructureBoundingBox);
    164                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 3, par3StructureBoundingBox);
    165                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 2, par3StructureBoundingBox);
    166                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 5, -3, 1, par3StructureBoundingBox);
    167                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 4, -3, 1, par3StructureBoundingBox);
    168                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 3, -3, 1, par3StructureBoundingBox);
    169
    170                ChestGenHooks dispenser = ChestGenHooks.getInfo(PYRAMID_JUNGLE_DISPENSER);
    171                ChestGenHooks chest = ChestGenHooks.getInfo(PYRAMID_JUNGLE_CHEST);
    172
    173                if (!this.field_74945_j)
    174                {
    175                    this.field_74945_j = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 3, -2, 1, 2, dispenser.getItems(par2Random), dispenser.getCount(par2Random));
    176                }
    177
    178                this.placeBlockAtCurrentPosition(par1World, Block.vine.blockID, 15, 3, -2, 2, par3StructureBoundingBox);
    179                this.placeBlockAtCurrentPosition(par1World, Block.tripWireSource.blockID, this.getMetadataWithOffset(Block.tripWireSource.blockID, 2) | 4, 7, -3, 1, par3StructureBoundingBox);
    180                this.placeBlockAtCurrentPosition(par1World, Block.tripWireSource.blockID, this.getMetadataWithOffset(Block.tripWireSource.blockID, 0) | 4, 7, -3, 5, par3StructureBoundingBox);
    181                this.placeBlockAtCurrentPosition(par1World, Block.tripWire.blockID, 4, 7, -3, 2, par3StructureBoundingBox);
    182                this.placeBlockAtCurrentPosition(par1World, Block.tripWire.blockID, 4, 7, -3, 3, par3StructureBoundingBox);
    183                this.placeBlockAtCurrentPosition(par1World, Block.tripWire.blockID, 4, 7, -3, 4, par3StructureBoundingBox);
    184                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 8, -3, 6, par3StructureBoundingBox);
    185                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 9, -3, 6, par3StructureBoundingBox);
    186                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 9, -3, 5, par3StructureBoundingBox);
    187                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 9, -3, 4, par3StructureBoundingBox);
    188                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 9, -2, 4, par3StructureBoundingBox);
    189
    190                if (!this.field_74946_k)
    191                {
    192                    this.field_74946_k = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 9, -2, 3, 4, dispenser.getItems(par2Random), dispenser.getCount(par2Random));
    193                }
    194
    195                this.placeBlockAtCurrentPosition(par1World, Block.vine.blockID, 15, 8, -1, 3, par3StructureBoundingBox);
    196                this.placeBlockAtCurrentPosition(par1World, Block.vine.blockID, 15, 8, -2, 3, par3StructureBoundingBox);
    197
    198                if (!this.field_74947_h)
    199                {
    200                    this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, chest.getItems(par2Random), chest.getCount(par2Random));
    201                }
    202
    203                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 9, -3, 2, par3StructureBoundingBox);
    204                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 8, -3, 1, par3StructureBoundingBox);
    205                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 4, -3, 5, par3StructureBoundingBox);
    206                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 5, -2, 5, par3StructureBoundingBox);
    207                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 5, -1, 5, par3StructureBoundingBox);
    208                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 6, -3, 5, par3StructureBoundingBox);
    209                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 7, -2, 5, par3StructureBoundingBox);
    210                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 7, -1, 5, par3StructureBoundingBox);
    211                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 8, -3, 5, par3StructureBoundingBox);
    212                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, -1, 1, 9, -1, 5, false, par2Random, junglePyramidsRandomScatteredStones);
    213                this.fillWithAir(par1World, par3StructureBoundingBox, 8, -3, 8, 10, -1, 10);
    214                this.placeBlockAtCurrentPosition(par1World, Block.stoneBrick.blockID, 3, 8, -2, 11, par3StructureBoundingBox);
    215                this.placeBlockAtCurrentPosition(par1World, Block.stoneBrick.blockID, 3, 9, -2, 11, par3StructureBoundingBox);
    216                this.placeBlockAtCurrentPosition(par1World, Block.stoneBrick.blockID, 3, 10, -2, 11, par3StructureBoundingBox);
    217                this.placeBlockAtCurrentPosition(par1World, Block.lever.blockID, BlockLever.invertMetadata(this.getMetadataWithOffset(Block.lever.blockID, 2)), 8, -2, 12, par3StructureBoundingBox);
    218                this.placeBlockAtCurrentPosition(par1World, Block.lever.blockID, BlockLever.invertMetadata(this.getMetadataWithOffset(Block.lever.blockID, 2)), 9, -2, 12, par3StructureBoundingBox);
    219                this.placeBlockAtCurrentPosition(par1World, Block.lever.blockID, BlockLever.invertMetadata(this.getMetadataWithOffset(Block.lever.blockID, 2)), 10, -2, 12, par3StructureBoundingBox);
    220                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 8, -3, 8, 8, -3, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    221                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 10, -3, 8, 10, -3, 10, false, par2Random, junglePyramidsRandomScatteredStones);
    222                this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 10, -2, 9, par3StructureBoundingBox);
    223                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 8, -2, 9, par3StructureBoundingBox);
    224                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 8, -2, 10, par3StructureBoundingBox);
    225                this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 10, -1, 9, par3StructureBoundingBox);
    226                this.placeBlockAtCurrentPosition(par1World, Block.pistonStickyBase.blockID, 1, 9, -2, 8, par3StructureBoundingBox);
    227                this.placeBlockAtCurrentPosition(par1World, Block.pistonStickyBase.blockID, this.getMetadataWithOffset(Block.pistonStickyBase.blockID, 4), 10, -2, 8, par3StructureBoundingBox);
    228                this.placeBlockAtCurrentPosition(par1World, Block.pistonStickyBase.blockID, this.getMetadataWithOffset(Block.pistonStickyBase.blockID, 4), 10, -1, 8, par3StructureBoundingBox);
    229                this.placeBlockAtCurrentPosition(par1World, Block.redstoneRepeaterIdle.blockID, this.getMetadataWithOffset(Block.redstoneRepeaterIdle.blockID, 2), 10, -2, 10, par3StructureBoundingBox);
    230
    231                if (!this.field_74948_i)
    232                {
    233                    this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, chest.getItems(par2Random), chest.getCount(par2Random));
    234                }
    235
    236                return true;
    237            }
    238        }
    239    }