TerraformersMC / ModMenu

A menu for, you guessed it, mods!
MIT License
492 stars 150 forks source link

game crashes, when another mod adds a GridWidget/GridLayout to the pause menu, on 6.1.0-rc.4 1.19.4 #582

Closed fayer3 closed 1 year ago

fayer3 commented 1 year ago

when another mod adds a GridWidget/GridLayout to the pause menu the game crashes, because of a failed cast

as an example, of a mod that does that, we with vivecraft do it, to get two buttons in one button slot.

latest log: latest.log

crash report: crash-2023-03-20_13.16.22-client.txt

fayer3 commented 1 year ago

this worked fine in 1.19.3 btw

fayer3 commented 1 year ago

affected code https://github.com/TerraformersMC/ModMenu/blob/acc51dfb6be35e392adb40fb4eda180b556225a8/src/main/java/com/terraformersmc/modmenu/mixin/MixinGameMenu.java#L40 doing a simple typecheck before the cast should prevent the crash for the moving of stuff you can cast to Widget instead I think.

lmore377 commented 1 year ago

By any chance can you provide a jar file with this fix? I'm not familiar with compiling java lol

Prospector commented 1 year ago

Will be releasing a fix shortly, fixed in d8daccd