Admicos / minecraft-wayland

A better way of running Minecraft Without XWayland. Because I REALLY had nothing better to do with my life.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.16 Forge doesn't seem to work

Admicos opened this issue · comments

No window appears, and this error is printed

[02:11:18] [Render thread/ERROR] [minecraft/Minecraft]: Shutdown failure!
java.util.ConcurrentModificationException: null
	at java.util.HashMap.forEach(HashMap.java:1339) ~[?:?] {}
	at net.minecraft.client.renderer.texture.TextureManager.close(TextureManager.java:167) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.close(Minecraft.java:911) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.func_71405_e(Minecraft.java:889) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:198) ~[minecraft-1.16.5-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.1.0-launcher.jar:36.1] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
	at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] {}
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}

This single line is also buried in the logs. Might be useful

xdg_wm_base@9: error 3: xdg_surface must not have a buffer at creation

Try adding -Dfml.earlyprogresswindow=false to MultiMC's Java arguments. Earlier this month I was trying to get ATM 6 (the forge modpack) working under wayland and I essentially independently came to the same solution you found with patch 0002. I found the above java argument because people reported it fixed some glfw issues with forge on m1 macs, and it also seems to fix glfw issues with forge on wayland as long as you apply patch 0002 as well. Also, you also shouldn't need patch 0004 with the argument as I believe it bypasses whatever code is triggering that function.

I believe the root cause of this issue is because forge patches minecraft to create the glfw window itself so that it can create the "early progress window" as seen here. Forge then delays showing the window as seen here which, referencing this commit in Kitty's Github repo, wlroots seems to not like. (the later half of the comment in that commit is extremely petty, but the former half gives a useful explanation).

Also, thanks for patch 0001! I tried it out a few days ago when you released waynotgonnaland, and it fixed the freezing issue that caused me to give up on getting this working earlier this month.

-Dfml.earlyprogresswindow=false Seems to be working. I'll add it to the README.