Goblin Traders

Goblin Traders

44M Downloads

[1.18.1] Incompatibility with Apotheosis

Shadows-of-Fire opened this issue ยท 5 comments

commented

Hi, I believe I'm having a similar issue to #53

Apotheosis allows enchantments to exceed their default max level, but your little anvil mixin prevents that from working at all - because you are imposing a hard cap w.r.t the default max of the enchantment.

Typically I would just point my redirector coremod at your classes calling Enchantment#getMaxLevel and be done with it, however, you are calling it from within a mixin, so that's not a valid option.

private int getEnchantmentLevel(Enchantment enchantment)
{
return enchantment.getMaxLevel();
}

For Apotheosis to be compatible, you would need to place this call in another class, and call that other class from your mixin, (so I can point my coremod at your class, the same as I do with Quark right here.

The other option would be to add a config value on your end that pack makers could flip off. You might also be able to use the anvil events rather than a mixin, which would be easier to add configuration to.

commented

I can definitely move the method to another class so it can be patched on your end. Does there need to be an exact signature so it can be targetted in your coremod or is it fine keeping it exactly the same (with the addition of a static modifer since it'd be moved)?

commented

There's no particular requirements, it just needs to be in a non-mixin class so I can point the coremod at it.
The coremod scans for any calls to replaced methods (in this case, getMaxLevel) and just redirects them to mine.

commented

Same thing is happening in version 1.16.5

commented

I saw your messages on Forge Discord, sorry I haven't got around to this. I am quite busy with lots of projects.

commented

See com.mrcrayfish.goblintraders.Hooks