    001    package net.minecraft.src;
    002
    003    import java.util.List;
    004    import java.util.Random;
    005
    006    public class ComponentStrongholdRightTurn extends ComponentStrongholdLeftTurn
    007    {
    008        public ComponentStrongholdRightTurn(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4)
    009        {
    010            super(par1, par2Random, par3StructureBoundingBox, par4);
    011        }
    012
    013        /**
    014         * Initiates construction of the Structure Component picked, at the current Location of StructGen
    015         */
    016        public void buildComponent(StructureComponent par1StructureComponent, List par2List, Random par3Random)
    017        {
    018            if (this.coordBaseMode != 2 && this.coordBaseMode != 3)
    019            {
    020                this.getNextComponentX((ComponentStrongholdStairs2)par1StructureComponent, par2List, par3Random, 1, 1);
    021            }
    022            else
    023            {
    024                this.getNextComponentZ((ComponentStrongholdStairs2)par1StructureComponent, par2List, par3Random, 1, 1);
    025            }
    026        }
    027
    028        /**
    029         * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
    030         * the end, it adds Fences...
    031         */
    032        public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox)
    033        {
    034            if (this.isLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox))
    035            {
    036                return false;
    037            }
    038            else
    039            {
    040                this.fillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 4, 4, true, par2Random, StructureStrongholdPieces.getStrongholdStones());
    041                this.placeDoor(par1World, par2Random, par3StructureBoundingBox, this.doorType, 1, 1, 0);
    042
    043                if (this.coordBaseMode != 2 && this.coordBaseMode != 3)
    044                {
    045                    this.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 1, 1, 0, 3, 3, 0, 0, false);
    046                }
    047                else
    048                {
    049                    this.fillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 1, 4, 3, 3, 0, 0, false);
    050                }
    051
    052                return true;
    053            }
    054        }
    055    }