Skip to content

Instantly share code, notes, and snippets.

@tanmayb123
Last active July 1, 2024 14:24
Show Gist options
  • Save tanmayb123/d55b16c493326945385e815453de411a to your computer and use it in GitHub Desktop.
Save tanmayb123/d55b16c493326945385e815453de411a to your computer and use it in GitHub Desktop.

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package

To begin, download the Minecraft on Apple Silicon package I've already put together, containing some pre-compiled core dependencies like LWJGL and a convenient set of setup & launcher scripts. Unzip the file, and navigate to it in your terminal. Then follow the next steps.

Download Minecraft client & client libraries

cd libraries
sh download.sh
cd ..

Download Minecraft assets

python3 downloadassets.py

Run Minecraft!

Note: Replace email@address.com and password with your actual username & password for Minecraft, but keep them enclosed in single quotes. This data is only used to communicate with Mojang's authentication servers and is never stored. The file containing your authtoken is deleted after the game launches.

sh launch.sh 'email@address.com' 'password'

@Mscichuj
Copy link

Mscichuj commented Nov 5, 2021

I did everything as said but when I try to launch Minecraft, it tries to start for a sec and then Minecraft luncher pops up this error:
The game crashed whilst unexpected error
Error: java.lang.NoClassDefFoundError: Could not initialize class ca.weblite.objc.RuntimeUtils
please, help me.

@doctorisyes
Copy link

The Version JSON files are different on versions like 1.12. How would I go about editing those JSON files to do the same thing we have done with newer versions on the vanilla launcher

@sanchezl
Copy link

sanchezl commented Nov 7, 2021

@Mscichuj I've seen this happen if you enable fullscreen. If that applies to you, edit you ~/Library/Application Support/minecraft/options.txt and set fullscreen:false.

@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

@mmshivesh
Copy link

mmshivesh commented Nov 20, 2021

I’ll try to do a FabricMC version soon for 1.17, I’ll probably skip the 1.16.5 one since it’s already outdated. I’ve found Optifine only works through Fabric, and also Fabric can allow most other mods so it’s really useful with a custom launcher like this.
@Pyrotex7

Do you have a script for getting Fabric working with 1.17? I am trying to figure out if there's a way to merge this and the other fork by OP with microsoft account support and get a fully command line launcher with mods working

@Pyrotex7
Copy link

Pyrotex7 commented Nov 30, 2021

I’m sorry I haven’t responded until now, I do not have a script, but I did post some assets to using fabric with this launcher above.

EDIT: Also, it’s only for 1.17.1, not 1.17 if you were specifically referencing that.

@MatthewB188
Copy link

If anyone is confused on how to get it setup, the best and easiest way I've found is to get Lunar Client. They have an apple silicon native version, 1.8-1.18 and optifine already installed up to 1.17.1 rn. Its not the answer for everyone but its worked great for me.

@estyseesghosts
Copy link

Gonna say Lunar is easy but you lose a lot, you don’t get to use mods and Lunar’s privacy policies are kinda sketchy IMHO

If you want an easier way to run MC on Apple Silicon while still having the flexibility of playing vanilla or using your own mods with Forge or Fabric, check out my gist, especially because MultiMC now has working Microsoft authentication 😉

@vargal380
Copy link

Is there anything to do when the log says this?
image

@Pyrotex7
Copy link

Just make sure you are using the Java 17 JDK - Azul has an ARM version of it.

@sergtimosh
Copy link

sergtimosh commented Dec 18, 2021

Traceback (most recent call last): File "/Users/arsentymoshenko/Downloads/MCAppleSilicon/getuuid.py", line 22, in <module> print(resp["selectedProfile"]["id"]) KeyError: 'selectedProfile' Traceback (most recent call last): File "/Users/arsentymoshenko/Downloads/MCAppleSilicon/getusername.py", line 22, in <module> print(resp["selectedProfile"]["name"]) KeyError: 'selectedProfile' Traceback (most recent call last): File "/Users/arsentymoshenko/Downloads/MCAppleSilicon/getauthtoken.py", line 22, in <module> print(resp["accessToken"]) KeyError: 'accessToken'

I'm unable to perform login with launch.sh. The reason is, that I'm using Microsoft authentication instead of mojang.
@tanmayb123 Can you suggest how to modify script to be able to login to the Minecraft?

From what I can see it's now more complicated that direct login with mojang account
https://wiki.vg/Microsoft_Authentication_Scheme

@MartinTintin3
Copy link

MartinTintin3 commented Dec 22, 2021

guys, I FIGURED OUT HOW TO RUN THIS NATIVELY ON ANY VERSION WITHOUT DOWNLOADING ANY NATIVES!!!! YOU ONLY NEED THE ARM64 JDK! Just use this client: https://github.com/MinecraftMachina/ManyMC it will automatically have support for arm64 lwjgl and stuff if you select the arm64 jdk. EPIC. This even works for versions of the game that use lwjgl 2 not 3

@raphtlw
Copy link

raphtlw commented Jan 29, 2022

I've created a new command line application that installs Minecraft natively for Apple Silicon into the Official Minecraft launcher. I'm certain that bugs have yet to be fixed, but it has been tested by some and found to be working as intended. You can check out the repository here, and the blog post that details installation steps here.

@artemisSystem
Copy link

Since the release of 1.19 and the vanilla launcher update that came with it, minecraft can now be played natively without any extra setup. Just launch minecraft with the bundled java executable (the default setting). It also works to supply it with a custom native jdk17. If you need to try something running in rosetta, supplying an x86-64 jdk17 will work for that as well.

@estyseesghosts
Copy link

estyseesghosts commented Jun 8, 2022 via email

@artemisSystem
Copy link

my guess is that it only runs native for versions that have lwjgl 3.3.0, which i think were updated to in one of the 1.19 snapshots. 1.18 and older probably still need rosetta if you don’t do any setup, though i haven’t tested it

@MidCoard
Copy link

MidCoard commented Nov 4, 2022

I have create a tool to generate natives for miencraft version lower than 1.19(including 1.13.2 1.16.5...), which is tested on Macos M1. There is also a plan for windows arm64 and linux arm64. Hope someone could help out.

@Pyrotex7
Copy link

Pyrotex7 commented Nov 5, 2022

Neat!

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