limitless

limitless

68.1k Downloads

Incompatible with Mo'Enchantments mod

greensad opened this issue ยท 4 comments

commented

Saw the other thread but still seems incompatible unless I'm missing something. Opening enchantment table causes all GUI blocks (chest, anvil, enchantment table) to no longer function. Game doesn't crash, when user selects "Save and Quit to Title" the game locks up and takes about 2 full min to progress. When Mo'Enchantments is removed, limitless functions as intended, all exactly as the other user described in September of last year.

commented

Testing limitless with Mo'Enchantments led me to locating and fixing an issue that could have caused such a scenario, but the problem persists. It appears that a certain function (EnchantmentHelperMixin#isAcceptibleForMoEnchantment) freezes the server when a high-level (at least several hundred thousand) enchantment is generated. After less than a minute, the function finishes and the enchantment entries appear, but hovering over an entry crashes the client as a result of deep recursion caused by EnchantmentSkeleton#toRoman.

A workaround for this issue is changing the maximum level of every enchantment from Mo'Enchantments in limitless' configuration to a smaller value like 100. The proper solution is to be implemented in Mo'Enchantments.

Should you find that the workaround works for you, you may close this issue.

Mo'Enchantments' code is a mess and debugging it is very time-consuming. In the future I will be less willing to work on issues related to it.

commented

While this did solve the issue on my end, I'm not really comfortable closing considering others dealing with this issue probably won't be privy to this workaround and workaround or no, the bug is still present by default. I'm not a mod author and my development experience is extremely limited so this suggestion may be awful, but is it possible to automatically detect when Mo'Enchantments is present and limit it's enchantments to maxlevel 100? I ask only because I've seen mention from other fabric mod authors implementing similar features to fix compatibility issues.

commented

The default maximum level for Mo'Enchantments enchantments is Byte.MAX_VALUE (127). Removing limitless' configuration file should fix the issue for existing instances.

commented

Thanks dude!