SKCraft / Launcher

🚀 Distribute your Minecraft modpacks with a custom launcher
Other
624 stars 437 forks source link

Natives incompatibility with MacOS #383

Closed ChloeDawn closed 3 years ago

ChloeDawn commented 3 years ago

Launcher version: 3a7c2507366292921a959aec59b31128213704a7 MacOS version: 11.1 (Big Sur)

The launcher cannot provide the correct natives on MacOS because it looks for osx natives when only macos natives exist

java.lang.NullPointerException
    at com.skcraft.launcher.model.minecraft.Library.getNativeString(Library.java:70)
    at com.skcraft.launcher.model.minecraft.Library.getArtifact(Library.java:94)
    at com.skcraft.launcher.update.BaseUpdater.installLibraries(BaseUpdater.java:225)
    at com.skcraft.launcher.update.Updater.update(Updater.java:194)
    at com.skcraft.launcher.update.Updater.call(Updater.java:97)
    at com.skcraft.launcher.update.Updater.call(Updater.java:40)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

The following natives lookup needs to use "macos" if "osx" is null (although I think osx may be entirely redundant now? Unsure.) https://github.com/SKCraft/Launcher/blob/f53ee9b6faf5af222b38da3c1d89b2bbedf4f785/launcher/src/main/java/com/skcraft/launcher/model/minecraft/Library.java#L64

ChloeDawn commented 3 years ago

On further inspection I misread the JSON. It seems there is still osx in natives, but the classifier is natives-macos. It also appears some natives are just absent for certain platforms of each library in my manifest... Unsure if bug.

Here is a copy of the modpack manifest: https://gist.github.com/ChloeDawn/0d09a037acf2dc9c9136fd96ecdc2442

hedgehog1029 commented 3 years ago

Introduced in ca08bbd, fixed in d0d8ad79eee873c8c6c2dd40fb16ca7b7f7e521a