Closed noeppi-noeppi closed 7 months ago
Thanks in advance for looking into this guys , Love both the mods
The previous issue was caused by the same circularity issue but with enchantment levels rather than getDamageBonus
- my opinion here is that you should not be calling getDamageBonus
in this method, as it will cause the actual attack damage of the item to be 2x * getDamageBonus
(which is probably unintentional).
as it will cause the actual attack damage of the item to be
2x * getDamageBonus
I know that and it is intentional.
it does it with no enchants on it also , just clicking the reforger , any level of reforging a plain hammer , with no enchants causes the crash also , this is in ATM 9 , but the previous one was in atm 7 ? one of the ATM worked perfect I think it was 6 no crashes at all from enchanted or unenchanted . 2x dmg is great , silent gears weapons do 5-8k , and the morgan is capped recently to 5k do the damage isnt a big deal .
IMC method loot_category_override
has been added to Apoth for 7.3.0 - the payload is a Map.Entry<Item, String>
where the string is a loot category ID ("sword"
in this case).
This is a duplicate of #929 which, contrary to what is said there, is still is not fixed in the latest 1.20.1 version. The problem is a stack overflow involving an apotheosis mixin to
EnchantmentHelper
:AffixHelper.getAffixes
here.LootCategory.forItem
tests all the validators of the different loot categories in theItemStack
, including theSWORD
validator.LootCategory.SWORD
queries the attribute modifiers here.EnchantmentHelper.getDamageBonus
in its implementation ofgetAttributeModifiers
here.EnchantmentHelperMixin#apoth_getDamageBonus
to be called forming an infinite loop and crashing with aStackOverflowError
.The crash can be triggered by putting Mjöllnir into a reforging table and hover over the suggested affix combinations.
I want this issue to be fixed, however, I can't see any good way to do that in MythicBotany, therefore it would be great if Apotheosis could provide some way (maybe through IMC) in which a mod can set the default LootCategory of an item preventing the validators from being called. This would allow me to set the loot category of Mjöllnir to
SWORD
manually and prevent the infinite loop.