Skip to content

Instantly share code, notes, and snippets.

@estyseesghosts
Last active October 11, 2024 12:12
Show Gist options
  • Save estyseesghosts/4ef2d8f1dd2a63689b82a5b05f7b1b37 to your computer and use it in GitHub Desktop.
Save estyseesghosts/4ef2d8f1dd2a63689b82a5b05f7b1b37 to your computer and use it in GitHub Desktop.

How to install Minecraft natively on Apple Silicon, the easiest way possible

1 - Download MultiMC from here

2 - Download Azul Zulu JDK from here (The version you want is Java 17, arm64, macOS, and you download the ZIP file.) Extract the ZIP file, open the folder and copy "zulu-17.jdk" to your home folder.

3 - Download tanmayb123's Minecraft on Apple Silicon package from here. Extract the ZIP and from the folder you are going to copy two files. One, the folder "lwjglnatives", and two, open the Libraries folder and copy "lwjglfat.jar". Move these to your home folder.

4 - Open MultiMC and create a new instance. Right click your instance and click edit instance. Make the following changes:

  • In the settings tab, set your Java installation to /Users/<username>/zulu-17.jdk/Contents/Home/bin/java

  • In the settings tab, set your Java arguments to -Dorg.lwjgl.librarypath=/Users/<username>/lwjglnatives/ -Dfml.earlyprogresswindow=false

  • In the version tab, click LWJGL 3, customize and then edit. It's going to open a file in your text editor. Select everything in that file, delete it all and paste the following:

{
    "formatVersion": 1,
    "libraries": [
        {
            "name": "lwjgl:lwjglfat:1",
            "MMC-hint": "local",
            "MMC-filename": "lwjglfat.jar"
        }
    ],
    "name": "LWJGL 3",
    "releaseTime": "2019-06-24T12:52:52+00:00",
    "type": "release",
    "uid": "org.lwjgl3",
    "version": "3.2.2"
}
  • Still in the version tab, click "Open libraries" and in the folder that opens paste the lwjglfat.jar file from earlier.

Now you should be able to run the game from within MultiMC. Click launch and sign in if asked. You can now also install Forge and/or Fabric and whatever mods you would like to use with either.

Look how fast it loads

F3 Menu

@estyseesghosts
Copy link
Author

Is there a way to get Minecraft working with TL launcher on M1?

Whether there is or isn't, I don't care enough to help with that cracked launcher. Come back when you've bought the game.

@thematver
Copy link

Is there a way to get Minecraft working with TL launcher on M1?

Whether there is or isn't, I don't care enough to help with that cracked launcher. Come back when you've bought the game.

Well, I already have bought the game, but TL is still my favourite pirate&licence launcher because of its beautiful UI.

@estyseesghosts
Copy link
Author

Is there a way to get Minecraft working with TL launcher on M1?

Whether there is or isn't, I don't care enough to help with that cracked launcher. Come back when you've bought the game.

Well, I already have bought the game, but TL is still my favourite pirate&licence launcher because of its beautiful UI.

Still a piracy launcher and I still won’t be helping with it. If you’ve bought the game legitimately, play through MultiMC, use Tanmay’s script or patch the JSON file for the version you want to play and use the official launcher.

@thematver
Copy link

Is there a way to get Minecraft working with TL launcher on M1?

Whether there is or isn't, I don't care enough to help with that cracked launcher. Come back when you've bought the game.

Well, I already have bought the game, but TL is still my favourite pirate&licence launcher because of its beautiful UI.

Still a piracy launcher and I still won’t be helping with it. If you’ve bought the game legitimately, play through MultiMC, use Tanmay’s script or patch the JSON file for the version you want to play and use the official launcher.

Lots of love <3 I'll try.

@ariz0
Copy link

ariz0 commented Jul 31, 2021

Hello, this is working really well, my Minecraft finally work natively on M1, thanks! However I had issue when using shader packs. I tried the project LUMA, it works but I only got around 20fps on fullscreen even with the lite profile. Is this normal? I'm running version 1.17.1.

@estyseesghosts
Copy link
Author

Hello, this is working really well, my Minecraft finally work natively on M1, thanks! However I had issue when using shader packs. I tried the project LUMA, it works but I only got around 20fps on fullscreen even with the lite profile. Is this normal? I'm running version 1.17.1.

I think this is just because of how horribly optimized 1.17 is, unfortunately. The game lags even on my Ryzen desktop so I doubt it’s related to specs.

I didn’t think this game could get any worse d: but here we are

I guess just wait for a fix or use 1.16.5 for your shader needs for now

@SoloUnity
Copy link

Not to ruin the party, but lunar client ( https://www.lunarclient.com/download ) has support for apple silicon across multiple versions from 1.7 to 1.17

@bcoco
Copy link

bcoco commented Aug 13, 2021

When I get through the instructions and boot up the game, I get this error message:

screenshot

Bummer is, trying to click either button gives me the rainbow beach ball of death, and the only way to get rid of it is to restart. Any thoughts?

EDIT: Got it! In case anyone else needs this... before launching, open up your System Preferences and go into the Security and Privacy tab. Then launch, and when you get the popup, you'll need to go back and forth between the popups, the "Allow apps downloaded from:" messages in the System Prefs window, and MultiMC, allowing and launching over and over until it goes through them all (five or six cycles, I think). Eventually, the game will load.

@estyseesghosts
Copy link
Author

When I get through the instructions and boot up the game, I get this error message:

screenshot

Bummer is, trying to click either button gives me the rainbow beach ball of death, and the only way to get rid of it is to restart. Any thoughts?

EDIT: Got it! In case anyone else needs this... before launching, open up your System Preferences and go into the Security and Privacy tab. Then launch, and when you get the popup, you'll need to go back and forth between the popups, the "Allow apps downloaded from:" messages in the System Prefs window, and MultiMC, allowing and launching over and over until it goes through them all (five or six cycles, I think). Eventually, the game will load.

You can also go to the folder with your LWJGL Natives, select all of them, right click and click open, then just close all the terminal windows that come up

@bnovc
Copy link

bnovc commented Aug 15, 2021

Thanks for writing this up. I tried it with 1.12 + MC Eternal. I don't get very far. Maybe this is expected, because maybe these libraries are too new to be compatible?

I don't think this is even getting to the installed libraries though.

java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

@MartinTintin3
Copy link

How would I do this for minecraft versions that use lwjgl 2 not 3? Like 1.12.2 for example

@MartinTintin3
Copy link

Thanks for writing this up. I tried it with 1.12 + MC Eternal. I don't get very far. Maybe this is expected, because maybe these libraries are too new to be compatible?

I don't think this is even getting to the installed libraries though.

java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

I think minecraft 1.12 uses LWJGL version 2, and the files described in this gist are for LWJGL 3. I have tried to compile LWJGL 2 for m1 mac, but with no luck. I guess you can only run minecraft versions that use LWJGL 3 not 2

@js802025
Copy link

I'm still crashing on startup when launching forge.

@ivxvm
Copy link

ivxvm commented Nov 12, 2021

This worked pretty well for me except there is one very annoying issue: when you open any inventory, cursor is stuck at the center of the screen for ~1 second before you can move it. This is an issue in lwjgl3 itself and it was fixed somewhere in 3.3.x. So I made a nightly 3.3 build of lwjglfat and natives and it works perfect now.

Sharing in case anyone wants it as well:
https://www.mediafire.com/file/obfwvvc5uacwy91/m1_lwjgl_330_nightly.zip/file

Minor changes in code I made to make this work described here: LWJGL/lwjgl3#695

Submodule jars packed into single "fat jar" using JarSplice 0.40

@Blyrexx
Copy link

Blyrexx commented Nov 12, 2021

This worked pretty well for me except there is one very annoying issue: when you open any inventory, cursor is stuck at the center of the screen for ~1 second before you can move it. This is an issue in lwjgl3 itself and it was fixed somewhere in 3.3.x. So I made a nightly 3.3 build of lwjglfat and natives and it works perfect now.

Sharing in case anyone wants it as well: https://www.mediafire.com/file/obfwvvc5uacwy91/m1_lwjgl_330_nightly.zip/file

Minor changes in code I made to make this work described here: LWJGL/lwjgl3#695

Submodule jars packed into single "fat jar" using JarSplice 0.40

What is the "libffi.a" file in the lwjglnatives folder for?

@ivxvm
Copy link

ivxvm commented Nov 12, 2021

This worked pretty well for me except there is one very annoying issue: when you open any inventory, cursor is stuck at the center of the screen for ~1 second before you can move it. This is an issue in lwjgl3 itself and it was fixed somewhere in 3.3.x. So I made a nightly 3.3 build of lwjglfat and natives and it works perfect now.
Sharing in case anyone wants it as well: https://www.mediafire.com/file/obfwvvc5uacwy91/m1_lwjgl_330_nightly.zip/file
Minor changes in code I made to make this work described here: LWJGL/lwjgl3#695
Submodule jars packed into single "fat jar" using JarSplice 0.40

What is the "libffi.a" file in the lwjglnatives folder for?

Most likely it's not needed (as it's a static library so I don't see how it could be used),
I just copied everything from bin/libs/native/macos/arm64/org/lwjgl in flat structure.
Pretty sure a lot of these dylibs are not used as well, but I included everything lwjgl3 provides to be safe.

@Blyrexx
Copy link

Blyrexx commented Nov 13, 2021

This worked pretty well for me except there is one very annoying issue: when you open any inventory, cursor is stuck at the center of the screen for ~1 second before you can move it. This is an issue in lwjgl3 itself and it was fixed somewhere in 3.3.x. So I made a nightly 3.3 build of lwjglfat and natives and it works perfect now.
Sharing in case anyone wants it as well: https://www.mediafire.com/file/obfwvvc5uacwy91/m1_lwjgl_330_nightly.zip/file
Minor changes in code I made to make this work described here: LWJGL/lwjgl3#695
Submodule jars packed into single "fat jar" using JarSplice 0.40

What is the "libffi.a" file in the lwjglnatives folder for?

Most likely it's not needed (as it's a static library so I don't see how it could be used), I just copied everything from bin/libs/native/macos/arm64/org/lwjgl in flat structure. Pretty sure a lot of these dylibs are not used as well, but I included everything lwjgl3 provides to be safe.

As far as I know Minecraft only uses lwjgl, lwjgl-glfw, lwjgl-jemalloc, lwjgl-openal, lwjgl-opengl, lwjgl-stb and lwjgl-tinyfd.

@GoldenAdrien
Copy link

So, I cannot find the Azul java 16 jdk for Mac OS. They just seem to skip java 16 altogether on the downloads page

@GoldenAdrien
Copy link

Also where is the home folder, I am confused by that

@estyseesghosts
Copy link
Author

So, I cannot find the Azul java 16 jdk for Mac OS. They just seem to skip java 16 altogether on the downloads page

Java 16 is considered an old version by Azul now, if you tick "Older Zulu Versions" you'll be able to download it

I don't have an Apple Silicon machine anymore so I can't confirm if Java 17 will work, unless I run into Apple sometime this weekend and try it on a MacBook there, but if I'll be honest I doubt there'd be any issues using Java 17

@MartinTintin3
Copy link

MartinTintin3 commented Nov 18, 2021

Also where is the home folder, I am confused by that

It is /Users/YourUsername
so like for example: /Users/Bob

@ivxvm
Copy link

ivxvm commented Nov 19, 2021

@GoldenAdrien @martinGITHUBER
That's user's home, but in the context of this thread, the question might be about JAVA_HOME environment variable,
which is, in case of Zulu JDK, will be something like this:

/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home

@estyseesghosts
Copy link
Author

@GoldenAdrien @martinGITHUBER That's user's home, but in the context of this thread, the question might be about JAVA_HOME environment variable, which is, in case of Zulu JDK, will be something like this:

/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home

I’m pretty sure they meant the user home folder.

@angus-lherrou
Copy link

This worked great for me with Java 17 and Minecraft 1.18. However, there was one small problem, which was that Gatekeeper prevented the lwjgl tools from running. I fixed that by running this command that removes them from quarantine:

xattr -dr com.apple.quarantine /Users/<username>/lwjglnatives/*

After this, the game launched just fine.

@jeffmcclure
Copy link

This worked perfectly! The only thing I had to do was go into System Preferences -> Security & Privacy -> General" and approve each native library when they attempted to load.

I'm getting a consistent 23 FPS with arm64 vs 15 FPS default Minecraft intel code. But more than that loading is much faster, and the whole experience is much, much faster and responsive. WHAT A DIFFERENCE!

I'm on MacBook Pro (16-inch, 2021); Chip: Apple M1 Pro; Memory 16GB.

@MartinTintin3
Copy link

@jeffmcclure I think you haven't done something correctly because I'm getting around 60-100 fps on my 14 inch m1 pro which is way more

@jeffmcclure
Copy link

@martinGITHUBER i am running 32 render distance and 32 simulation with a very large world. I’ve installed optifine and now I’m getting 40fps and above.

@jeffmcclure
Copy link

I should add that I have also switched over to using ManyMC instead of this gist.

https://github.com/MinecraftMachina/ManyMC

@JeffersonDing
Copy link

Wrote a quick python script to streamline the process. This one uses the official Minecraft launcher, I feel like this is the cleanest method.
https://github.com/JeffersonDing/arm64-minecarft

@colingoodman
Copy link

colingoodman commented Feb 5, 2022

This guide is working great for vanilla; I get 100+ fps at native resolution. However installing Sodium completely tanks the frame rate and I only get 10-20 fps. Does anyone have any thoughts on troubleshooting?

Edit: As explained here you need to set the chunk memory allocator setting to swap under video settings > advanced. Completely resolves my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment