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