private static ComponentVillage getVillageComponentFromWeightedPiece(StructureVillagePieceWeight par0StructureVillagePieceWeight, List par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7)
    {
        Class var8 = par0StructureVillagePieceWeight.villagePieceClass;
        Object var9 = null;

        if (var8 == ComponentVillageHouse4_Garden.class)
        {
            var9 = ComponentVillageHouse4_Garden.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageChurch.class)
        {
            var9 = ComponentVillageChurch.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageHouse1.class)
        {
            var9 = ComponentVillageHouse1.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageWoodHut.class)
        {
            var9 = ComponentVillageWoodHut.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageHall.class)
        {
            var9 = ComponentVillageHall.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageField.class)
        {
            var9 = ComponentVillageField.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageField2.class)
        {
            var9 = ComponentVillageField2.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageHouse2.class)
        {
            var9 = ComponentVillageHouse2.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }
        else if (var8 == ComponentVillageHouse3.class)
        {
            var9 = ComponentVillageHouse3.findValidPlacement(par1List, par2Random, par3, par4, par5, par6, par7);
        }

        return (ComponentVillage)var9;
    }