EpicSquid / SuperiorShields

MIT License
8 stars 8 forks source link

Infinite armor from Knightmetal shield #24

Closed Hekera closed 2 years ago

Hekera commented 2 years ago

General Information

Describe the bug: The knightmetal shield grants 4 armor every time it gets changed (e.g. when it recharges) or equipped. This armor does not get taken off when the shield is unequipped, only on relog.

To Reproduce:

  1. Equip the knightmetal shield
  2. Unequip the knightmetal shield

Expected behavior: Equipping the shield only grants armor once, when equipped, then removes the armor when unequipped.


Environment Versions

Superior shields 1.18.2-2.0.5


Additional Information

Additional context: https://github.com/MysticMods/SuperiorShields/blob/b88c29475fceb2c9ef39c19580588d09aae8ce52/src/main/java/epicsquid/superiorshields/item/KnightmetalShieldItem.java#L23 The UUID here should only be generated once, i.e. you can use an online UUID generator and call UUID.fromString(yourGeneratedUUID);

Bluberry-Kat commented 2 years ago

this appears to be the case for every shield with an AttributeModifier.
i managed to find this bug with the malum Soul Stained Steel shield. image