Jump to content

Minecraft: Difference between revisions

From Official NixOS Wiki
imported>Aaronchall
new minecraft page stub
 
Moraxyc (talk | contribs)
m refer to hmcl wiki page
 
(20 intermediate revisions by 12 users not shown)
Line 1: Line 1:
== Minecraft client ==
{{disambiguation|message=This page is about Minecraft <em>clients</em>, for server setup see [[Minecraft Server]].}}


Look for prismlauncher or atlauncher in nixpkgs.
[https://www.minecraft.net/about-minecraft Minecraft] is a sandbox game about building, surviving, fighting, and being creative, developed by Mojang Studios.<ref>[https://www.minecraft.net/en-us/about-minecraft https://www.minecraft.net/about-minecraft]</ref> [https://www.minecraft.net/about-minecraft Minecraft] currently has two supported variants known as:
* '''Minecraft: Java Edition''', which is only available on Windows, MacOS, and Linux, and is known for modding.
* '''Minecraft: Bedrock Edition''', which is available on Windows, Xbox One, Xbox Series S and X, PlayStation 4 and 5, Nintendo Switch, Android, and iOS. Bedrock is not playable on Linux due to UWP applications not being supported on Linux.<ref>https://www.minecraft.net/article/java-or-bedrock-edition</ref><ref>[https://learn.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide https://learn.microsoft.com/windows/uwp/get-started/universal-application-platform-guide]</ref>


- [https://search.nixos.org/packages?channel=23.11&show=prismlauncher&from=0&size=100&sort=relevance&type=packages&query=minecraft nixpkgs.prismlauncher]
== Launchers ==
- [https://search.nixos.org/packages?channel=23.11&show=atlauncher&from=0&size=100&sort=relevance&type=packages&query=minecraft nixpkgs.atlauncher]
'''Official Minecraft Launcher:''' [https://www.minecraft.net/download Website] — {{nixos:package|minecraft}} {{warning|1.19 and higher does not work on NixOS, using alternative clients is strongly recommended.}}


As of this writing the [https://search.nixos.org/packages?channel=23.11&show=minecraft&from=0&size=100&sort=relevance&type=packages&query=minecraft nixpkgs.minecraft] was not working on multiple nixos installations.
'''[[Prism Launcher]]:''' A free, open source launcher. [https://prismlauncher.org/ Website] — {{nixos:package|prismlauncher}}


== Minecraft Server Setup ==
'''ATLauncher:''' A simple and easy to use Minecraft launcher which contains many different modpacks for you to choose from and play. [https://atlauncher.com/about Website] — {{nixos:package|atlauncher}}


We need more contributors here - see also:
'''Badlion Client:''' A closed source PvP modpack. [https://www.badlion.net/ Website] — {{nixos:package|badlion-client}}


- https://discourse.nixos.org/t/howto-setting-up-a-nixos-minecraft-server-using-the-newest-version-of-minecraft/3445
'''Lunar Client:''' A free Minecraft client with mods, cosmetics, and performance boost. [https://www.lunarclient.com/ Website] — {{nixos:package|lunar-client}}
 
'''[[HMCL]]:''' A Minecraft Launcher which is multi-functional, cross-platform and popular. [https://hmcl.huangyuhui.net/ Website] — {{nixos:package|hmcl}}
 
== Installation ==
Your preferred client can be installed by adding the package to your configuration:
 
<syntaxhighlight lang="nix">
environment.systemPackages = [
  pkgs.<LAUNCHER>
];
</syntaxhighlight>
 
Alternatively, the package can be installed per-user with <code>users.users.<USER>.packages</code> or [[Home Manager|home-manager]].
 
For a NixOS configuration, use:
 
<syntaxhighlight lang="nix">
users.users.<USER>.packages = [
  pkgs.<LAUNCHER>
];
</syntaxhighlight>
 
For [[Home Manager|home-manager]], use:
 
<syntaxhighlight lang="nix">
home.packages = [
  pkgs.<LAUNCHER>
];
</syntaxhighlight>
 
Alternatively, it can be imperatively installed by running <code>nix-env -iA nixos.<LAUNCHER></code> or <code>nix profile install nixpkgs#<LAUNCHER></code> if [[Flakes]] are enabled.
 
== Troubleshooting ==
 
=== ATlauncher can't start instance ===
By default, ATlauncher installs its own Java runtime in <code>**USERSDIR**/runtimes/minecraft</code>, which gets selected in the settings' <code>Java Path</code>.
 
To fix this, make sure to select the java version installed in the system store from the <code>Settings > Java/Minecraft > Java Path</code> menu and also disable the <code>Use Java Provided By Minecraft?</code> option.
 
If your instance still doesn't start, check the instance settings and apply the same changes there.
 
=== Prism Launcher doesn't have Java Version XX. ===
The [[Prism Launcher]] package can be overridden to add additional [[Java]] runtimes. Check [[Prism_Launcher#Advanced]] to see an example.
 
=== Minecraft Launch Error with NVIDIA Graphics and System GLFW. ===
When using the system GLFW together with an NVIDIA graphics card in the launcher, Minecraft may fail to start and display the following error message: <code>GLFW error 65544: EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection</code>.
 
In this case, setting the environment variable <code>__GL_THREADED_OPTIMIZATIONS</code> to <code>0</code> resolves the issue.
 
=== Minecraft can’t start without Java Version XX. ===
Different Minecraft versions need different [[Java]] versions
{| class="wikitable"
|+
!Minecraft Version
!Minimum Compatible JRE Version
|-
|< 1.17
|8
|-
|1.17
|16
|-
|>= 1.18
|17
|-
|>= 1.20.5
|21
|}
 
=== Official Minecraft Launcher fails to start the game. ===
It is possible that you are attempting to start a version of Minecraft that is 1.19 or higher. '''Unfortunately, this is broken on NixOS'''. It is strongly recommended to use alternative launchers.'''
 
 
== See Also ==
* [https://wiki.archlinux.org/title/Minecraft Minecraft on Arch Wiki]
 
 
== References ==
{{Reflist}}
 
 
[[Category: Applications]]
[[Category: Gaming]]

Latest revision as of 04:27, 11 April 2026

⤧︎
Disambiguation: This page is about Minecraft clients, for server setup see Minecraft Server.

Minecraft is a sandbox game about building, surviving, fighting, and being creative, developed by Mojang Studios.[1] Minecraft currently has two supported variants known as:

  • Minecraft: Java Edition, which is only available on Windows, MacOS, and Linux, and is known for modding.
  • Minecraft: Bedrock Edition, which is available on Windows, Xbox One, Xbox Series S and X, PlayStation 4 and 5, Nintendo Switch, Android, and iOS. Bedrock is not playable on Linux due to UWP applications not being supported on Linux.[2][3]

Launchers

Official Minecraft Launcher: Websiteminecraft

⚠︎
Warning: 1.19 and higher does not work on NixOS, using alternative clients is strongly recommended.

Prism Launcher: A free, open source launcher. Websiteprismlauncher

ATLauncher: A simple and easy to use Minecraft launcher which contains many different modpacks for you to choose from and play. Websiteatlauncher

Badlion Client: A closed source PvP modpack. Websitebadlion-client

Lunar Client: A free Minecraft client with mods, cosmetics, and performance boost. Websitelunar-client

HMCL: A Minecraft Launcher which is multi-functional, cross-platform and popular. Websitehmcl

Installation

Your preferred client can be installed by adding the package to your configuration:

environment.systemPackages = [
  pkgs.<LAUNCHER>
];

Alternatively, the package can be installed per-user with users.users.<USER>.packages or home-manager.

For a NixOS configuration, use:

users.users.<USER>.packages = [
  pkgs.<LAUNCHER>
];

For home-manager, use:

home.packages = [
  pkgs.<LAUNCHER>
];

Alternatively, it can be imperatively installed by running nix-env -iA nixos.<LAUNCHER> or nix profile install nixpkgs#<LAUNCHER> if Flakes are enabled.

Troubleshooting

ATlauncher can't start instance

By default, ATlauncher installs its own Java runtime in **USERSDIR**/runtimes/minecraft, which gets selected in the settings' Java Path.

To fix this, make sure to select the java version installed in the system store from the Settings > Java/Minecraft > Java Path menu and also disable the Use Java Provided By Minecraft? option.

If your instance still doesn't start, check the instance settings and apply the same changes there.

Prism Launcher doesn't have Java Version XX.

The Prism Launcher package can be overridden to add additional Java runtimes. Check Prism_Launcher#Advanced to see an example.

Minecraft Launch Error with NVIDIA Graphics and System GLFW.

When using the system GLFW together with an NVIDIA graphics card in the launcher, Minecraft may fail to start and display the following error message: GLFW error 65544: EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection.

In this case, setting the environment variable __GL_THREADED_OPTIMIZATIONS to 0 resolves the issue.

Minecraft can’t start without Java Version XX.

Different Minecraft versions need different Java versions

Minecraft Version Minimum Compatible JRE Version
< 1.17 8
1.17 16
>= 1.18 17
>= 1.20.5 21

Official Minecraft Launcher fails to start the game.

It is possible that you are attempting to start a version of Minecraft that is 1.19 or higher. Unfortunately, this is broken on NixOS. It is strongly recommended to use alternative launchers.


See Also


References

Template:Reflist