SpongeForge icon indicating copy to clipboard operation
SpongeForge copied to clipboard

Soulbound enchantment from CoFH Core doesn't work properly

Open mrapplexz opened this issue 5 years ago • 2 comments

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

  1. Enchant any item with cofhcore:soulbound and put it into your inventory.
  2. Kill yourself multiple times.
  3. 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

mrapplexz avatar Aug 18 '19 11:08 mrapplexz

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

ImMorpheus avatar Sep 14 '19 18:09 ImMorpheus

Any news?

XakepSDK avatar Dec 22 '19 17:12 XakepSDK