Throwaway because people know my reddit name. Me [21/M].

A friend [20/M] Ive had for 3 years told me 2 years ago he likes men and was in love with me. Since then he regularly makes 'jokes' about me being gay and that we had sex, even thought he knows Im not into guys and knows I dislike him makes those 'jokes'. He makes them in front of people who knows what hes saying is not correct, but also in front of people who dont know that and probably believe him for what he is saying.
When I tell him again that I dislike it he indirectly tells me to stop making a big deal out of it.

Recently I started getting a feeling that, when he has the opportunity, he cares more about making fun of me than being a friend to me. It is with these 'jokes' (which he knows I greatly dislike) but also bashing the way I do things, even thought his arguments for it are not that correct if I research them after.

Im pretty sure I have to end this friendship but find it hard.
Still most of the times (lets say 60%) of the time he is being nice to me and we can have interesting conversations.
When I tell myself that this week Im going to start hanging out with him less, I lose that idea when he suddenly starts being nice again, only to remember and see the 40% later.
I also dont want not-wanting-to-hang-out-with-him to affect hanging out with friends we share. 
I see him once a week at a friends meeting, which I dont want to miss to be honest. So completely stop seeing him is not an option.
I am also interesting in going to another friends meeting heś also attending. 

I would like some advice on how to start hanging out with him less and also how I can minimise the damage he makes when we do happen to be in the same room, and the 40% is active.

Sorry for the grammar mistakes, I know they are there even thought I dont see them. Its late and I cant sleep because of this issue.
I guess I can sleep now. Ill fix the mistakes later.
user
My friend who is not into me, makes 'jokes' about me being gay and that we had sex, and when I tell him I do not like this 'jokes' he tells me to shut up when I tell him again. I feel he cares more about making fun of me than being a friend to me. How can I start hanging out with him less
assistant
Throwaway because people know my reddit name. Me [21/M].

A friend [20/M] Ive had for 3 years told me 2 years ago he likes men and was in love with me. Since then he regularly makes 'jokes' about me being gay and that we had sex, even thought he knows Im not into guys and knows I dislike him makes those 'jokes'. He makes them in front of people who knows what hes saying is not correct, but also in front of people who dont know that and probably believe him for what he is saying.
When I tell him again that I dislike it he indirectly tells me to stop making a big deal out of it.

Recently I started getting a feeling that, when he has the opportunity, he cares more about making fun of me than being a friend to me. It is with these 'jokes' (which he knows I greatly dislike) but also bashing the way I do things, even thought his arguments for it are not that correct if I research them after.

Im pretty sure I have to end this friendship but find it hard.
Still most of the times (lets say 60%) of the time he is being nice to me and we can have interesting conversations.
When I tell myself that this week Im going to start hanging out with him less, I lose that idea when he suddenly starts being nice again, only to remember and see the 40% later.
I also dont want not-wanting-to-hang-out-with-him to affect hanging out with friends we share. 
I see him once a week at a friends meeting, which I dont want to miss to be honest. So completely stop seeing him is not an option.
I am also interesting in going to another friends meeting heś also attending. 

I would like some advice on how to start hanging out with him less and also how I can minimise the damage he makes when we do happen to be in the same room, and the 40% is active.

Sorry for the grammar mistakes, I know they are there even thought I dont see them. Its late and I cant sleep because of this issue.
I guess I can sleep now. Ill fix the mistakes later.
user
Friend makes funny jokes about me being gay and having sex and even though I know he knows Im not, he tells people (who know) that he likes me and is in love with me. When I tell him that Im not into guys he is still making fun of me. When I start to see him less he becomes nice again. I want to
assistant