SpongeForge
SpongeForge copied to clipboard
Soulbound enchantment from CoFH Core doesn't work properly
I am currently running
- SpongeForge version: 1.12.2-2838-7.1.7-RC3900
- Forge version: 14.23.5.2838
- Java version: 1.8.0_222
- Operating System: Linux 5.2.7-arch1-1-ARCH
- Mods: CoFH Core, Redstone Flux
Issue Description The Soulbound enchantment from CoFH Core should decrement its level on death with some chance, however it doesn't happen if Sponge is installed.
Steps to reproduce
- Enchant any item with
cofhcore:soulbound
and put it into your inventory. - Kill yourself multiple times.
- Look at the item, enchantment level is the same that it was before you died.
Logs With Sponge installed: https://gist.github.com/mrAppleXZ/92720056bfd5a1c363656cd3afb69f36 Without Sponge installed: https://gist.github.com/mrAppleXZ/a2334be31993594df30e1a895a353527
CoFHCore is looking for an enchanted item (with souldbound) on the old player inventory (during PlayerEvent.Clone
).
See https://github.com/CoFH/CoFHCore/blob/31cebcb2b0e358c09c926a1c86a0226e9c873922/src/main/java/cofh/core/proxy/EventHandler.java#L422
The item is not found with SpongeForge because we're clearing the old player inventory here: https://github.com/SpongePowered/SpongeCommon/blob/a00f52d6a59bfa89976f7257eae11e2565267b97/src/main/java/org/spongepowered/common/mixin/core/entity/player/EntityPlayerMPMixin.java#L329
Any news?