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

[Feature Request] Right click to equip trinkets in the first valid slot #301

Closed thomasglasser closed 5 months ago

thomasglasser commented 5 months ago

It would be nice for gameplay if right-clicking while holding a trinket puts it in the first valid slot like Curios.

TheIllusiveC4 commented 5 months ago

This isn't default behavior in Curios, it needs to be specified by the mod in their implementations. Similarly, Trinkets already has a TrinketItem.equipItem for calling equip on use behavior.

thomasglasser commented 5 months ago

Because that behavior is defined in TrinketItem, it must be re-implemented in any item that uses a different base class or multi-loader projects where the item can't extend TrinketItem. Curios putting the method in the interface allows for better configuration.

emilyploszaj commented 5 months ago

TrinketItem.equipItem is static, you can call it from wherever.