    001package net.minecraft.world.gen.structure;
    002
    003import java.util.List;
    004import java.util.Random;
    005
    006public class StructureNetherBridgePieces
    007{
    008    private static final StructureNetherBridgePieceWeight[] primaryComponents = new StructureNetherBridgePieceWeight[] {new StructureNetherBridgePieceWeight(ComponentNetherBridgeStraight.class, 30, 0, true), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCrossing3.class, 10, 4), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCrossing.class, 10, 4), new StructureNetherBridgePieceWeight(ComponentNetherBridgeStairs.class, 10, 3), new StructureNetherBridgePieceWeight(ComponentNetherBridgeThrone.class, 5, 2), new StructureNetherBridgePieceWeight(ComponentNetherBridgeEntrance.class, 5, 1)};
    009    private static final StructureNetherBridgePieceWeight[] secondaryComponents = new StructureNetherBridgePieceWeight[] {new StructureNetherBridgePieceWeight(ComponentNetherBridgeCorridor5.class, 25, 0, true), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCrossing2.class, 15, 5), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCorridor2.class, 5, 10), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCorridor.class, 5, 10), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCorridor3.class, 10, 3, true), new StructureNetherBridgePieceWeight(ComponentNetherBridgeCorridor4.class, 7, 2), new StructureNetherBridgePieceWeight(ComponentNetherBridgeNetherStalkRoom.class, 5, 2)};
    010
    011    private static ComponentNetherBridgePiece createNextComponentRandom(StructureNetherBridgePieceWeight par0StructureNetherBridgePieceWeight, List par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7)
    012    {
    013        Class oclass = par0StructureNetherBridgePieceWeight.weightClass;
    014        Object object = null;
    015
    016        if (oclass == ComponentNetherBridgeStraight.class)
    017        {
    018            object = ComponentNetherBridgeStraight.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    019        }
    020        else if (oclass == ComponentNetherBridgeCrossing3.class)
    021        {
    022            object = ComponentNetherBridgeCrossing3.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    023        }
    024        else if (oclass == ComponentNetherBridgeCrossing.class)
    025        {
    026            object = ComponentNetherBridgeCrossing.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    027        }
    028        else if (oclass == ComponentNetherBridgeStairs.class)
    029        {
    030            object = ComponentNetherBridgeStairs.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    031        }
    032        else if (oclass == ComponentNetherBridgeThrone.class)
    033        {
    034            object = ComponentNetherBridgeThrone.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    035        }
    036        else if (oclass == ComponentNetherBridgeEntrance.class)
    037        {
    038            object = ComponentNetherBridgeEntrance.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    039        }
    040        else if (oclass == ComponentNetherBridgeCorridor5.class)
    041        {
    042            object = ComponentNetherBridgeCorridor5.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    043        }
    044        else if (oclass == ComponentNetherBridgeCorridor2.class)
    045        {
    046            object = ComponentNetherBridgeCorridor2.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    047        }
    048        else if (oclass == ComponentNetherBridgeCorridor.class)
    049        {
    050            object = ComponentNetherBridgeCorridor.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    051        }
    052        else if (oclass == ComponentNetherBridgeCorridor3.class)
    053        {
    054            object = ComponentNetherBridgeCorridor3.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    055        }
    056        else if (oclass == ComponentNetherBridgeCorridor4.class)
    057        {
    058            object = ComponentNetherBridgeCorridor4.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    059        }
    060        else if (oclass == ComponentNetherBridgeCrossing2.class)
    061        {
    062            object = ComponentNetherBridgeCrossing2.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    063        }
    064        else if (oclass == ComponentNetherBridgeNetherStalkRoom.class)
    065        {
    066            object = ComponentNetherBridgeNetherStalkRoom.createValidComponent(par1List, par2Random, par3, par4, par5, par6, par7);
    067        }
    068
    069        return (ComponentNetherBridgePiece)object;
    070    }
    071
    072    static ComponentNetherBridgePiece createNextComponent(StructureNetherBridgePieceWeight par0StructureNetherBridgePieceWeight, List par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7)
    073    {
    074        return createNextComponentRandom(par0StructureNetherBridgePieceWeight, par1List, par2Random, par3, par4, par5, par6, par7);
    075    }
    076
    077    static StructureNetherBridgePieceWeight[] getPrimaryComponents()
    078    {
    079        return primaryComponents;
    080    }
    081
    082    static StructureNetherBridgePieceWeight[] getSecondaryComponents()
    083    {
    084        return secondaryComponents;
    085    }
    086}