16

I've been playing Minecraft with my son for a couple of years now, while using the same account on a LAN without any problem, until the past couple of weeks. I have a Mac and a Windows 10 machine, both running the latest stable releases. I used a common 'hack' to allow the same account to connect to each other by editing the launcher_profile.json file on the Mac, and changing the username and DisplayName variables to something else (in this case, 'Dad').

This hack is no longer working, and I can't find anything recent that confirms any changes to hack.

How can I get LAN gaming working again without purchasing another Minecraft account?
(I'm not interested in using it for online multiplayer).

5
  • 2
    I'm not sure if this would run afoul of our rule about piracy. I recall there being something about LAN that didn't need two accounts, but I'm not 100% sure on that.
    – Frank
    Commented Jun 30, 2018 at 12:24
  • I wouldn't personally consider this use case to be piracy, by the legal definition (I think it falls under "fair use" though IANAL) However, both piracy AND "mod development" are off-topic, and it seems to me that this use case falls somewhere between those two things.
    – Steve-O
    Commented Jun 30, 2018 at 16:21
  • You're playing Java Edition, not Bedrock/Pocket/Windows 10/"Better together"/whateverIt'sCalled Edition, right? Commented Jul 2, 2018 at 8:29
  • I've used this feature before since 2018, and the only thing that has changed is the file name (launcher_accounts.json). Commented Oct 13, 2021 at 9:55
  • Here's a method that worked for me today for Java edition on a Mac. Launch Minecraft, then run ps -e | grep java, and it'll show the command used to launch Minecraft. There's a --username arg. Changing that, then closing Minecraft and using the modified invocation worked for me. I'd add this as an answer, but I don't have the reputation to answer this "highly active" question. If somebody could make an answer out of this, I wouldn't mind. Commented Oct 15, 2023 at 17:20

4 Answers 4

11

The issue is that Minecraft contacts their servers when you start up, and overwrites the displayName with whatever is linked to the actual account on their servers. Then, when you connect to the LAN game, it complains that a user with that name already exists.

I found that the solution is to somehow stop Minecraft from accessing the internet. Do the displayName trick, game on.

The crude version of this is to just disconnect your house's internet cable from the modem/router. Keep the wifi/lan router on, just don't connect it to the internet.

A less crude version is to just block access to the Minecraft servers. For me (Windows 10), these were the steps:

  1. The "original" displayName trick: open C:\Users\<username>\AppData\Roaming\.minecraft\launcher_profiles.json in a text editor, search for "displayName" and replace the value next to it by someting else (eg "Dad").
  2. Open Notepad with administrator rights
  3. From within Notepad, browse to C:\Windows\System32\drivers\etc\, set the file filter to "All files", and open the file called hosts (it has no file extension)
  4. Add a line with the following text:

    0.0.0.0 minecraft.net
    
  5. Launch Minecraft, connect to your son's LAN game as usual

The steps are very similar on Mac and Linux.

Step 1 is described in more detail here: Is it still possible to set your username in offline mode in Minecraft 1.6 and later?

Steps 2-4 are described in more detail here: https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/

This way, you don't need to kick the rest of the family off Netflix :-)

There's still a downside: minecraft.net will be blocked for all your applications. You won't be able to download minecraft updates or even visit the site. Acceptable to me, although I still think Minecraft should have some sort of "father and son" mode - IMO it's ridiculous that I need to pay for two licenses just to be able to help a six year old build a roof every two months. That can't have been the idea behind Minecraft's licensing setup.

4
  • 1
    Seems they have blocked this little "exploit". Now when I login it just tells me "Failed to verify username!" :(
    – slott
    Commented Feb 9, 2019 at 19:09
  • 2
    While skrebbel has an excellent answer, I believe Minecraft has blocked this on Windows Java edition by authenticating your account each time you run the launcher...no more offline mode :(
    – kibitzforu
    Commented Jul 14, 2019 at 12:36
  • It was easier for me to disable the WiFi on my laptop while starting the launcher - it offered me to "Play Offline" - which I accepted just before enabling the back the WiFi - problem solved!
    – maxint
    Commented Oct 2, 2021 at 12:58
  • Hello ! Great answer. It didn't work for me, maybe because it was patched, I can't tell, but it put me on the right tracks for a new workaround. I use a local server on a phone-generated LAN with no internet access. It seems like we have to edit "launcher_accounts.json" for the name. I also changed some other parameters to random stuff so I don't know which ones were really useful... If you have doubts, check the server logs, they can be really useful to know what name your client gave to the server. Commented Dec 3, 2021 at 14:41
6

Try to change online-mode=true - replace true with false in the server startup config. You also need to change DisplayName on one of the client instance. This helps me with the same issues.

6
  • This seems like the better answer. Tried the accepted and it didn't work. What are the downsides of online-mode=false?
    – slm
    Commented Jun 24, 2019 at 23:40
  • This and the previous answer are correct in combination. I just did both for my java version before seeing this page while looking if the same is possible on Bedrock LAN servers.
    – Dan V
    Commented Oct 14, 2019 at 3:44
  • Note that online-mode is specified in server.properties file in your server folder. It seems you need this as well as displayName change in %USERPROFILE%\AppData\Roaming\.minecraft\launcher_profiles.json. Commented Nov 24, 2019 at 11:22
  • where is this server.properties file? I can't find it. there is no server folder
    – Ofir
    Commented Feb 4, 2021 at 14:46
  • Run the server for the first time and it creates server.properties. You can then stop it, edit it and restart. Commented Mar 30, 2021 at 10:39
6

Open the following file with notepad:

C:\Users\<username>\AppData\Roaming\.minecraft\launcher_profiles.json

change the line with the display name so that all clients on LAN have different display names.

finally, save the file, right click, select properties, enable Read only, click ok.

Start game as normal.

0

Besides editing the variable displayName in %appdata%\.minecraft\launcher_profiles.json to a different name, I found that you need to end the process Minecraft Launcher first before launching it again, otherwise the old variable is overwritten back. You should see the new name in the launcher.

2
  • Will this make the 'hack' the OP is talking about work?
    – Joachim
    Commented Oct 13, 2020 at 6:27
  • Of course, I just tested with the latest version yesterday. Maybe it wasn't necessary to manually end the Minecraft Launcher process before.
    – user1000
    Commented Oct 13, 2020 at 16:11

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