Can't set up a local LAN server on Minecraft 12w25a?
Can you help us? We're trying to create a LAN game from the latest snapshot of Minecraft. While in-game on my single player map, I selected "Open to LAN" but instead of giving me the LAN IP or my laptop's name, it gave me "localhost:12345" where 12345 is a random port.
My brother is on Windows 7 while I'm on a OS X Snow Leopard. We tried creating the single-player LAN server over at his laptop as well but he instead got his computer name as opposed to my "localhost". With all that said, we still can't seem to connect to each other. When he tries to connect to me, he gets a "Failed to connect" error. If I try to connect over to him, I will get the "Connecting" message for quite some time then a few minutes later, my Minecraft would crash.
Can anyone help us out? I know this should be on the minecraft forums but it's currently loading very very slowly on our network for some reason.
Solution 1:
Open the console on your brother's computer and type in "ipconfig". This will return your brother's local IP address. Assuming you are on the same network, you will be able to connect to the server with that IP address. It should start with "192.168".
Solution 2:
1. Open Terminal
2. Type
ifconfig
3. Write down your LAN ip
It is under eth0 (or ethN where N is any digit) section. Its the value after inet addr:
in the second line of the section probably. It is something like 192.168.0.xx
usually.
4. Type
sudo nano /etc/hosts
5. Edit the file.
You probably will see something like this (mine is from Ubuntu but it looks very similar on Mac OS)
127.0.0.1 myhostname localhost
::1 myhostname localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
The goal here to provide you LAN ip address to your hostname. Edit the file to look like
192.168.0.x myhostname
127.0.0.1 localhost
::1 myhostname localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Where 192.168.0.x
is you LAN ip from the figure 3 above and myhostname
is the hostname that was attached to 127.0.0.1 with localhost before editing.
6. Save the hosts file
Press Ctrl+o
then Enter
then Ctrl+x
.
7. You are done
Start Minecraft and open your game to LAN. Minecraft shall display your LAN IP now instead of localhost.