Globox1997 / BackSlot

https://modrinth.com/mod/backslot
https://www.curseforge.com/minecraft/mc-mods/backslot
GNU General Public License v3.0
9 stars 13 forks source link

Sword items in back slot will always trigger Enchantment#onTargetDamaged #86

Closed MoriyaShiine closed 2 years ago

MoriyaShiine commented 2 years ago

Hi! Since you add back slot items to getItemsEquipped at https://github.com/Globox1997/BackSlot/blob/f3f3aef39f18f2be844d1badb67d8c7caca50069/src/main/java/net/backslot/mixin/EntityMixin.java#L19, this causes EnchantmentHelper#onTargetDamaged to count enchantments that override onTargetDamaged in that method; this is not visible in vanilla because no vanilla enchantments override this method but any modded enchantments that do will trigger their effect.

Relevant issue: https://github.com/MoriyaShiine/enchancement/issues/39 Version: 1.2.8

Globox1997 commented 2 years ago

Updated compat with lambdynlights which is the reason for this mixin. It is not a very good solution but it works https://github.com/Globox1997/BackSlot/commit/e62c4e0ea283b1270b8a3845979ef4e5d70af927