emilyploszaj / trinkets

A data-driven accessory mod and API for Minecraft using Fabric.
https://www.curseforge.com/minecraft/mc-mods/trinkets
MIT License
165 stars 72 forks source link

[Suggestion] Add equip/unequip event #309

Open ochotonida opened 4 months ago

ochotonida commented 4 months ago

Currently, the only way to detect whether an item is being unequipped or equipped in a trinket slot is to have a Trinket attached to the itemstack that overrides onUnequip, or to manually keep track of all equipped items. When adding effects based on an equipped item's components/nbt, attaching a Trinket to the stack might not be ideal or possible if the item is not owned by the mod. Adding an event similar to Curios' CurioChangedEvent, that fires any time an equipped item changes, would resolve this.