Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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.

share|improve this question
    
I have exactly the same issue. "localhost" means that it binds server on local network interface that is accessible from the same machine only not from the network. I'm trying to figure out how to let Minecraft know the correct interface to bind to. Will post here if I will succeed. –  lig Aug 2 '12 at 6:38
    
ok. I'm done. Writing the answer now. –  lig Aug 2 '12 at 6:47

3 Answers 3

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".

share|improve this answer
1  
Or "10." depending on which private subnet is in use. –  dlanod Jul 31 '12 at 22:33
    
This is only possible with an actual server (doesn't have to be port forwarded for LAN use), not the "Open to LAN" option. –  Timtech Jul 26 '13 at 23:53

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.

share|improve this answer

I don't understand why it would need a port. Whenever I play LAN games, I don't need to port forward or anything. Did you try:

  • brothers-computer-name with port number
  • brothers-computer-name without port number

The new snapshot is technically a beta, so maybe cross-platform support isn't in yet? I find this hard to believe, but it is possible (the crash is my support for this theory). Windows and OS X use their own networking libraries, I believe (I only know about Window's WinSock which I don't think would be on OS X), so the different addresses is probably not something Mojang can control.

Minecraft should automatically find the LAN server. Does it come up in the list? Or do you have to find it manually? I just did a quick test on my computer, and it came up and I could connect (aside from being kicked off for logging in with two clients). I have no ports forwarded or anything.

share|improve this answer
    
It doesn't come up anywhere, it's like the two units aren't on the same LAN network at all. –  Propeller Jun 25 '12 at 3:11
    
Typing in localhost and 127.0.0.1 on his brother's computer isn't going to work. Try pinging your computer from your brother's computer to see if his computer can see yours. –  DanielGibbs Jun 25 '12 at 20:27
    
Why was this answer downvoted? –  Ender Jun 26 '12 at 16:05
    
@Ender Because I forgot that you can't connect to another machine one your network with localhost (127.0.0.1). I'm a little rusty with LAN networking because my brother stopped playing computer games... –  smoth190 Jul 2 '12 at 3:35
    
(edited to make it more accurate) –  Jeffrey Lin Jul 18 '12 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.