Help With Minecraft LAN Server On Mac?

This is not trivial as it requires forcing a _JAVA_OPTION override at launch (or system wide).


Diagnose


To diagnose this as the cause, first launch Minecraft from terminal with the _JAVA_OPTIONS overridden.


1. Close Minecraft
2. Open 🔎 Spotlight (🔎 in upper right of Desktop)
3. Search for “Terminal”, open the app
Paste the following command in:


_JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true /Applications/Minecraft.app/Contents/MacOS/launcher


Attempt to connect to LAN server and see if it fixes the problem


Permanently Fix


Using Minecraft Launch Options: @TheOnlyMrCat provides a method here that does not involve editing any files by hand. Please try that before making changes to the Minecraft launcher. Nfo.so


Patching the launcher manually:


Use this method only if you have problems using @TheOnlyMrCat’s solution.


This _JAVA_OPTIONS override can be provided in many locations but since launching from Terminal is not ideal, we need to use a technique that fixes when clicking on the icon. At time of posting, the Apple recommended method for providing overrides is inside the App bundle itself using something called LSEnvironment


1. Optionally install a Text Editor such as Atom to edit XML files.
2. Using Finder, go to Applications
3. Locate (don’t open) the Minecraft App
4. Right click Minecraft, Show Package Contents
5. Go into the Contents folder and locate Info.plist
6. Right click Info.plist, Open With, Atom (or TextEditor)
Near the bottom of the file, add the following in between the LSEnvironment _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true


Unfortunately this does not take effect right away. This is due to the way Mac caches it’s launch services.

Leave a Reply

Your email address will not be published. Required fields are marked *