Cannot connect to a local LAN world in 1.18, But did work in 1.17.
Steps to Reproduce:
1. Create a new world on a device that is connected to the internet.
2. On the pause game menu press "Open to LAN", then "open LAN"
3. On a separate device, that is on the same internet as LAN host, connect to the LAN world using the 'Direct Connect' button under multiplayer
4. Enter the hoast's IPv4 address followed by the port number that the server device received afterward separated by a ":"
5. Then press enters to attempt to connect to LAN world.
Observed Results:
Minecraft attempts to connect to LAN world but ends up failing.
Expected Results:
The device properly connects to LAN world, like in 1.17 or older versions
Other Notes
The below attachment contains the "Server", the device that hosted the world called "LAPTOP-V0RUD04F", and the "Client", The device that failed to connect to the world.
The attachment includes both the Vanilla Minecraft and the OptiFine logs.
Everything worked fine prior to 1.18.
Tested the issue on 1.18 and 1.18.1 with the same result.
Attachments
Comments 2
Fix for anyone that is having the same issue:
Start Minecraft.
Open Task Manager (press the Windows button, type "task manager" then press enter)
In the Processes tab find java.exe or OpenJDK Platform binary, if you expand it will show the Minecraft title.
Right click on that process and click "Open file location"
Now copy the entire file location; should look something like C:\Users\...\java-runtime-beta\bin\javaw.exe
Open Mcafee, Go to the "My Protection" on the left.
Click "Firewall", Click "Internet Connections for Programs"
Scroll to the bottom and press "add"
Now click "Browse..." and enter the copied file location in the address bar
Set access to "Incoming and outgoing" and select "Use designated ports (recommended)" or "Open to all devices" if that doesn't work.
Set Net Guard to "On"
Finally, click Save.
You should now be able to connect to LAN worlds on your local network.
Thank you for your report!
However, this issue is Invalid.
This is a technical support issue; this site is for bug reports only. We do not have the resources to provide you with technical support.
Please contact Community Support for assistance and refer to this ticket (e.g. "I have reported this issue on Mojira as MC-XYZ.").
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki