Trinkets Compat Layer for Accessories

Trinkets Compat Layer for Accessories

3M Downloads

[Trinkets API/Compat] Offhand vs. mainhand can't be distinguished from code

Ampflower opened this issue ยท 4 comments

commented

With a mod that uses the handedness of the slot to determine which hand to render it on, I noticed that it always returned the main hand despite there being two slots allocated specifically for offhand and mainhand.

  • accessories 1.1.0-beta.28+1.21.1
  • tclayer 3.10.0+beta.19

If possible, the distinction should still be made, as in stock Trinkets:

  • It is possible to know which hand the slot is for and act upon it.
    • Not that there's many such cases out in the wild, it could be used for say, reach.
  • Or render it for a specific hand, instead of both.
commented

Pushed a commit that fixes the issue by spoofing the slot type as stated and should allow for rendering on both hands based on even slot indexes being on the main hand and odd slot indexes on the offhand

commented

Well this is going to be a issue as the problem such slots get merged down as Accessories only has 2 hand slots and not two different hand slots. Within Accessories the way to choose which had to render on comes down to what index value (odd vs even) to choose which hand you are on.

I wonder if it is possible to wrap the renders with some way of spoofing the hand slot based on this index value from Accessories if equipped within the hand slot as a fix... will need some time to investigate and @Ampflower could you send me the name of a mod that takes advantage of such?

commented

The mod I do know would isn't public; tho it sounds like for your case, you probably could just do the same index value trick to determine whether to send in hand or offhand as the start of the group; which frankly would suffice if you can't tag on extended metadata.

commented

The fix has been pushed and an update made to curseforge and modrinth