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