[BUG] desc doesn't show with custom Fullname
FOOLSIX opened this issue · 6 comments
Minecraft Version
1.19.2
Mod Version
13.0.20
Mod Loader
Forge
What environment are you running the mod in?
Client
Issue Description
I'm a new modder and making my enchantment mod.
For some reason, I override Enchantment#getFullname and modify the displayed name, and then found that the desc of these enchantments is not displayed.
All other enchantments whose names have not been changed are ok.
My Code
(My JEI plugin reads and shows desc correctly, but this mod does not)
Hello, this mod relies on the enchantment name to locate where the description should be inserted. In your case the curse prefix breaks this logic so it can't find where to insert the description. It's not an ideal approach but it's from before mixins were widely used. You can see the code here. This will be improved in 1.21 but I am not sure about 1.19.2.
Thank you for your prompt reply. I understand now, my prefix has become the contents of this line's Component, and the description ID has been placed in the siblings. Is it possible for this to be improved in versions 1.19.2 and 1.20.1? Or it would be better if I changed the prefix to a suffix?
I just released a new update for 1.20.1. If this fix works I can backport it to 1.19.2 as well.
It seems that the build was not successful, 1.20.1 update was not released.But the code looks fine
Thanks, looks like some bad code snuck into that commit. It's fixed and available now as 17.1.18.