My tutorial for Minecraft 1.12.1 includes the ability to connect to servers: http://raspberrypi.org/forums/viewtopic.php?f=78&t=186547
Copied here for completeness:
How to setup Full Minecraft 1.12.1 (with Optifine) on Raspberry Pi 3
Please note :
Do this at your own risk.
If you have any doubts use a spare SD card.
The OpenGL drivers are experimental - they may not work with all screens. If unsure make sure you can ssh onto the Pi from another machine to turn back off.
Most likely to have success with OpenGL drivers if using Raspberry Pi 3 with heatsink, genuine 5.1 volt 2.5 amp power supply with heavy duty 2 core power cable, 1080p screen.
This should also work on the Pi2.
This tutorial was tested using Raspbian Stretch with Desktop - release date 2017-08-16
Video tutorial : https://www.youtube.com/watch?v=yTRYomiQMAY
1 If you need to update an existing version use
sudo apt-get update && sudo apt-get -y upgrade
If you get any questions or prompts during raspbian update press ‘q’ ‘enter’
2 In Menu\Preferences\Raspberry Pi Configuration :
System Tab - set Splash Screen to Disabled
Performance Tab - set GPU Memory to 64Mb
- if using Pi2 set overclock to High(1000MHz)
Reboot
3 Enable ‘GL Driver’ from a terminal window
sudo raspi-config
This will start the config utility. Select 'Advanced Options', then select 'GL Driver', then select 'Enable' (latest utility requires selection of 'GL (Full KMS)' ), then select 'Yes' to reboot and enable the driver.
4 Install OpenAL Audio & glxgears demo
sudo apt-get -y install libalut0 libalut-dev && sudo apt-get -y install mesa-utils
5 Test driver using glxgears
glxgears
This should run at about 60 fps.
6 Download Minecraft
mkdir ~/Minecraft; mkdir ~/Minecraft/Natives; cd ~/Minecraft && wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
7 Run launcher :
cd ~/Minecraft && java -jar Minecraft.jar
Login with Minecraft email and password
If your using a newer Minecraft.jar click 'edit profile' and select use release - 'release 1.12.1', then 'save profile'
Click Play to install game
You will then receive an error
Close launcher
8 Copy libraries
cd ~/Minecraft/Natives && wget https://www.dropbox.com/s/4oxcvz3ky7a3x6f/liblwjgl.so && wget https://www.dropbox.com/s/m0r8e01jg2og36z/libopenal.so
9 Update lwjgl
cd ~/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209 && rm lwjgl-2.9.4-nightly-20150209.jar; wget https://www.dropbox.com/s/mj15sz3bub4dmr6/lwjgl-2.9.4-nightly-20150209.jar
( based on Roger Allen's tutorial : http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/ )
10 Download “OptiFine 1.12.1 HD U C5” from http://optifine.net/downloads
11 Install Optifine
cd ~/Downloads && java -jar OptiFine_1.12.1_HD_U_C5.jar
Click install.
Run launcher
cd ~/Minecraft && java -jar Minecraft.jar
Select the OptiFine profile and click play. The launcher will crash
12 Copy run script
cd ~/Minecraft/ && wget https://www.dropbox.com/s/ca37tzxxc9hvsyd/runOptifine1_12_1.sh && sudo chmod +x runOptifine1_12_1.sh
13 Edit runOptifine1_12_1.sh
Update MINECRAFT_LOGIN, MINECRAFT_USERNAME and MINECRAFT_PASSWORD to your own (may need "" for special characters)
14 Start Minecraft from terminal window
./runOptifine1_12_1.sh
Change options in Minecraft to reduce render chunks to 2, this should avoid running out of memory.
Turn everything down to low in the video settings (and turn on things like fast math)
Suggest running in the default sized window for best performance - full screen may crash.
https://youtu.be/2sREfySmRNU
Hopefully Minecraft should run :)