yusefnapora / m1-multimc-hack

A quick & dirty way to get Minecraft running via MultiMC on the Apple M1 with native performance
265 stars 47 forks source link

All version support #2

Open r58Playz opened 3 years ago

r58Playz commented 3 years ago

Title.

Caveats: The narrator has been disabled by decompiling and recompiling. fixed

17hoehbr commented 3 years ago

Works for me after I fixed the log file location. Please approve my pull request in your fork first.

r58Playz commented 3 years ago

Optifine does not work due to https://github.com/sp614x/optifine/issues/4824.

It got fixed, yay

au5ton commented 3 years ago

Will this be merged @yusefnapora ? I have some improvements that will make getting the latest nightly LWJGL builds easier.

MoustacheOff commented 3 years ago

Does it work with Minecraft Forge?

MoustacheOff commented 3 years ago

And how can I download the updated files please? It seems to be awesome work!

MoustacheOff commented 3 years ago

@au5ton Your work is great! I tested on multiple versions and it works! :D

theofficialgman commented 3 years ago

@r58Playz have you considered making a custom meta-multimc repo instead of using this wrapper command? its a compile time parameter so it would only be for custom builds (which would also allow multimc5 itself to run native) https://github.com/theofficialgman/meta-multimc/tree/master this is the one I maintain for arm64 linux ^

ViRb3 commented 2 years ago

@yusefnapora @r58Playz @theofficialgman I have created an unofficial, fully native build of MultiMC for macOS arm64 (M1). It is powered by a custom meta package, and it can run all Minecraft versions from 1.5.2 to 1.18, including Forge. It works without any manual setup or wrappers.

Find it here: https://github.com/MinecraftMachina/ManyMC

theofficialgman commented 2 years ago

@ViRb3 a couple of things to note for your meta repo. https://github.com/MinecraftMachina/meta-multimc-arm64 you can actually remove all the 2.9.X folders except 2.9.4-nightly-20150209.json, no multimc meta package refers to the old versions anymore.

also, replacing all lwjgl 3 with 3.3.0 works mostly but will (and has) caused some bugs/crashes in mods, specifically sodium fabric mod had a known incompatibility (though there is a workaround in sodium now for the crash, https://github.com/CaffeineMC/sodium-fabric/issues/748 https://github.com/CaffeineMC/sodium-fabric/commit/fac6e03a22de5510c0cbd0a9d10eceb4455b6601). You should probably note this on the install page that there may be crashes in 1.13+ mods. The commits to lwjgl 3.3.0 which allow for building on arm64 macos/windows can be backported to older lwjgl versions to fix potential incompatibilities, thats what I did for linux. If you ever go that route, you should probably start off with my linux arm branches of 3.1.6, 3.2.1, and 3.2.2, since most of the changes necessary are already there.

specially, you would probably need (most of) these commits cherry-picked/backported (adding them here for my reference as well if I ever get board and do it): https://github.com/LWJGL/lwjgl3/commit/9bd6e6046c6098c1f905e3681f32b95c7ec3f532 https://github.com/LWJGL/lwjgl3/commit/2ddd63f500bf941715fc6c75cf36d9b84a62318d https://github.com/LWJGL/lwjgl3/commit/960462c687ce04903c1281de3815a94f3b28b2c1 https://github.com/LWJGL/lwjgl3/commit/6e7fdff0c0c9009c207849c0dc8241e9dca43464 https://github.com/LWJGL/lwjgl3/commit/bd9557d1caec517480b59c177d499e74a8705637 https://github.com/LWJGL/lwjgl3/commit/9de37ae508955ddc77e2746843000b18ff6407da https://github.com/LWJGL/lwjgl3/commit/c32e229ef9ca183283c7544a5b8842aa21989d91 https://github.com/LWJGL/lwjgl3/commit/8a990e070f28dcb166377219c27599a7276712fc https://github.com/LWJGL/lwjgl3/commit/d97533c8c61701335adbefe35a9b52c2aacf2c12

also, inverted colors is an interesting bug... never seen that before myself on any version on armhf/arm64 linux. Probably just some macos arm64 opengl bug in particular.

Using text-to-speech will result in a crash No current workaround

on armhf/arm64 linux text2speech just doesn't get loaded because it can't load an x86_64 binary (I didn't replace the native), so can't be enabled. I assume text2speech tries to get loaded through rosetta2 on macos resulting in a crash for you.

ViRb3 commented 2 years ago

Thanks so much for the detailed tips @theofficialgman. I did not expect that there would be breaking changes between minor updates of LWJGL3. I will definitely check out your repos and build the original LWJGL versions for each Minecraft release.

on armhf/arm64 linux text2speech just doesn't get loaded because it can't load an x86_64 binary (I didn't replace the native), so can't be enabled. I assume text2speech tries to get loaded through rosetta2 on macos resulting in a crash for you.

Have you tried pressing Ctrl + B (enable text-to-speech) while in-game? The natives are not loaded unless you invoke them, except on MC 1.12-1.13 with text2speech < 1.11, where they are loaded on start and cause a crash. I had to update the dependency so it delays the crash until Ctrl + B is pressed.

P.S. Do you mind if I connect with you in case I have any questions about the compilation? Ideally E-mail, Discord, or Telegram. Many thanks.

theofficialgman commented 2 years ago

@ViRb3 I'm gman#3709 on discord (kinda busy this week but I should be free to talk next week).

I did not expect that there would be breaking changes between minor updates of LWJGL3.

You can read the release notes for lwjgl versions on the github, they always detail breaking changes in each version. Usually we just get lucky and vanilla minecraft is not affected by them.

Have you tried pressing Ctrl + B (enable text-to-speech) while in-game?

I have not, because I get logs in the minecraft log detailing the natives could not be found (on linux if the architecture doesn't match, the file basically doesn't exist to programs). Also the button in the GUI settings page is greyed out and says it can't be enabled, so I never thought to try the hotkey. I'll have to check later. I assume this is still a macos only issue since rosetta tries to get used.

MoustacheOff commented 2 years ago

@r58Playz Could you apply the fixes from this on your fork? https://github.com/GameParrot/minecraft-mac-window-fix/ (but with the arm64 native libraries)