Its a common bug that i experienced with a lot of mods and sometimes with the unmodded version. Use direct ip method to join games. If 2 of you are in lan use the 192.168.0.xxx or 192.168.1.xxx ip where xxx is the number belonging to the host. You can see that if u go to your network connection details. If you 2 are not in lan u can use sites like www.whatismyip.com and that should do it. Ofc check the firewalls and such.