noeppi-noeppi / MythicBotany

Apache License 2.0
17 stars 13 forks source link

Crash while trying to add Apotheosis affix to Mjoelnir #122

Closed Zarvera closed 7 months ago

Zarvera commented 1 year ago

This is, of course, not neccessarily Mythic Botany's fault, but considering so far it only ever happened to Mjoelnir i'll try you guys first. What happens is when you put Mjoelnir into the reforge table from Apotheosis and add ingredients so that it displays 3 possible affix combinations, hovering cursor over any of them crashes instance. Crash is a doozy, too: https://controlc.com/93f6142d

noeppi-noeppi commented 1 year ago

Happens because of this mixin calling LootCategory.forItem on mjöllnir. The SWORD loot category then check the attribute modifiers to check whether something counts as sword.

However, the code that computes the mjöllnir attribute modifiers calls EnchantmentHelper.getDamageBonus which causes an infinite loop.

I don't see a good way to fix this in MythicBotany. Apotheosis is doing the mixin here and I think they should fix the problem.

Another way would be an option in Apotheosis to override the loot category via IMC (just as it's possible to set hard caps for enchantments via IMC). In that case I could just set a category and Apotheosis would no longer need to check all possible categories preventing the crash.