Sebastien
Do you subscribe to subjective reality or intention manifestation? If so you can use those to try and alter the current relationship you have with your friend. If you have never tried these before, alot of people here can help.

Have you tried talking to him about it? Clear the air, maybe he has some other unresolved issue with you.
Also just because someone is convenient does not necessary mean they are your friend. You said you like that he lives close and you have the same class, so it is easy to work on projects with him. That does not sound like a good foundation for a friendship. Friends of convenience aren't really friends.