Why is my ex acting like this?

Me and my ex have been sleeping together for 3 months or so, on and off. We have been speaking almost daily, sometimes all day other times just random chat here and there.
i think I still love him I’m not sure, he feels like a drug and when I don’t speak to him I hate it. He makes me feel less lonely and comforted when I have contact with him.
He isn’t very consistent in his behaviours which is what’s upsetting me. I don’t want to be with him so I don’t know what I’m trying to achieve in being in contact with him. One week he’s obsessed with me when I don’t message him. He was drunk a few times and said ‘I miss your attention and cuddling you’ and another time he was drunk he kept ringing me asking what I’m doing.
i just want him to want me.
Yesterday he said we can’t have sex anymore as it will complicate things if we ever meet anyone else and the other person will just get jealous. I hate that he said that as we have great sex and the fact he doesn’t even want that from me hurts.
I was drunk and we were at the same pub so hearing him say that to me really hurt and I blocked him off everything. I know deep down it’s the right thing to do so I can move on but I don’t think I ever will, I feel sad and lonely now that I don’t have him on any social media. He’s like a comfort blanket. He’s rude to me at times yet super needy the next.
I’m not in love with him but I care so much about him whereas he clearly does about me.
i don’t know what to do and if blocking him was the right thing.
any advice please? :(
Why is my ex acting like this?
Add Opinion