TheDeathlyCow / frostiful

A Vanilla+ Snow & Frost Update Survival Experience for Minecraft
GNU Lesser General Public License v3.0
16 stars 8 forks source link

Incompatibility with Lucky Blocks mod #39

Closed Zano1999 closed 5 months ago

Zano1999 commented 1 year ago

With your mod installed and the Lucky Blocks mod the game crash on startup

Log: https://pastebin.com/wLnC2jMU Crash report: https://pastebin.com/GKc1ksHq

TheDeathlyCow commented 1 year ago

Do you have a link to the mod? I found this but the id seems to be different: https://modrinth.com/mod/luckyblocks

TheDeathlyCow commented 1 year ago

Actually, I think I found it here. The problem is on Lucky Block's side, not mine. They attempt to execute a switch statement over the EnchantmentTarget enum and throw NoWhenBranchMatchedException when the default branch is reached in the method FabricGameAPIKt#toEnchantmentType. This exception is unhandled and thus causes a crash. Unfortunately due to the rather poor way that Minecraft implemented EnchantmentTarget, in order to add my own custom target (which I do for the Frost Wand) I have to do some weird ASM stuff to extend the enum. Since this extension is not included in their switch statement, it will always fallback to the default branch and cause a crash. There isn't much I can do to fix this (without removing a feature from the mod), so I would suggest contacting the Lucky Block developer.

TheDeathlyCow commented 8 months ago

reopening because this can be fixed in 1.20.5

TheDeathlyCow commented 5 months ago

Ok for some reason that old link got bought out by some dodgy crypto bros. I think this might be the same mod but since its still 1.20.2 I cant test yet: https://www.curseforge.com/minecraft/mc-mods/lucky-block