Dark Utilities

Dark Utilities

115M Downloads

Add support for Trinkets API.

FishyDreamer opened this issue ยท 5 comments

commented

Mod Version:
v10.0.4

Minecraft Version:
1.18.2

Bug Description:
The portal charm doesn't work as intended with the nether portal when equipped in the necklace slot but works when held in hand. The necklace slot is provided by the Trinkets (Fabric) mod v3.3.1.

Steps to reproduce the behavior:
Walk into nether portal with portal charm in necklace slot.

commented

I have the same issue, the charm works in any inventory slot, but not in the necklace slot with Trinkets (fabric).
Same problem for the warding charm.

commented

Same issue noted myself with Portal Charm and Sleep Charm in Trinkets slots.
MC v1.19.4, Fabric Loader v0.14.21, Fabric API v0.83.0 ,Trinkets v3.6.0, Dark Utilities v15.0.1.

The Dark Utilities wiki mentions Curios compatibility, but not Trinkets.
The Curios mod mentions that they dropped Fabric support back at MC v1.17 and recommend Trinkets instead, but the compatibility may not be automatic.
I don't personally know, as I've not done any relevant MC mod coding.

commented

It looks like you never implemented a charmresolver for trinkets. If on the Fabric side you add a charmresolver and then register a Trinket implementation that just calls inventoryTick on the itemstack, that should work. You would need to register this implementation of thr Trinket interface for each item (1 implementation but registered for each of your items)

commented

I went through the repo quickly and saw that the tag for trinkets was added to the necklace. This is why it is possible to equip it. Though the ItemCharm class doesn't inherit TrinketItem. I guess this is why it's not working. In order to change that, the forge and fabric class for the itemcharms should be separate, the Fabric one inheriting from Trinket Item. But Trinkets would be a dependency for the Fabric version.

commented

Unfortunately the Trinkets API has never been officially supported or tested. It's been on my TODO list for quite a while now but other projects and features have been higher priority. Ideally the Trinkets API would just call the preexisting InventoryTick method just like the Curios API rather than requiring their own proprietary version of the method. I would need to look into it more and reach out to them but I have very little interest in creating a separate version of the item specifically for Fabric / their mod.