Having issues with my cat while pregnant

Erica • Love my life!
So it's my first pregnancy and I had my cat for two years before I got pregnant . My cat is a huge mamas boy . He won't leave my site always wanting full attention from me at all times. Now he has been cold and mean. He tries to take me out will run at me at full speed in the dark. He also will come lay next to me and snuggle then out of no where he will claw me or bite me. I know he jealous and I try to give him as much attention as possible but he seems to still be a little monster. He also never really cared for my hubby and now every time my hubby talks to my belly the cat will come running and seeks for his attention . Has anyone ever expriance this with there cat? I'm worried because my due date is around the corner and I'm scared he's going to attack my baby.