Closed Fuzss closed 2 years ago
Hmm this is pretty strange considering Apotheosis does not ever change the Enchantment#category
field
Will there be an update to fix this issue with Enchanting infuser?
This is the cause: https://github.com/Safrodev/Apotheosis-Fabric/blob/1f4a6c0ec27dd2f601253f4ccade79433cee5228/src/main/java/safro/apotheosis/ench/enchantments/InertEnchantment.java#L11
The Forge mod has this, too, not sure what else they do, because on Forge everything works as expected.
Ah I see. This enchantment is not supposed to be obtainable through normal means, but dark enchanting grabs all registered enchantments. Thank you for finding this though, I should be able to fix it.
Just an idea, but how about making your own EnchantmentCategory
for this single enchantment which simply doesn’t match any item?
Creating a custom EnchantmentCategory
can easily be done on Forge via enum extending, but Fabric doesn’t have such a feature unfortunately.
Therefore I made my own library a while ago: https://github.com/Fuzss/extensibleenums-fabric
I really think this could be quite useful here.
Also here is a mod where I‘ve used said library: https://github.com/Fuzss/bagofholding-fabric/blob/f91433e4bec7e3f8101ad9871884cdb0b61724d0/src/main/java/fuzs/bagofholding/registry/ModRegistry.java#L29
I appreciate the help but I managed to fix it with some minor tweaks. Everything should be working in v0.2.5 :)
You seem to be setting the
EnchantmentCategory
field onEnchantment
tonull
for (some?) enchantments. This really doesn't work out very well as the field is not expected to be null and is also public, so mod compat really is an issue here.https://crashy.net/eAYaiO3W2Pp8uIma8Jhj