emilyploszaj / trinkets

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

[1.18/1.19]About the trinkets api usage #233

Closed SAGESSE-CN closed 1 year ago

SAGESSE-CN commented 1 year ago

can you provide a clean api? the current design TrinketsApi.getTrinketComponent directly depends on dev.onyxstudios.cca.api.*.

when i use trinket component the compiler can't find ComponentV3, this leads to the need to additionally import the dev.onyxstudios.cca jar if I want to integrate your api.

and the integration method I adopt is different from what you imagined, i will deobse the jar in the forgecurge maven, and then directly use it.

as a consumer of the api, I don't care about your implementation. But now the implementation is limiting me.

emilyploszaj commented 1 year ago

Trinkets uses the Cardinal Components API as an included dependency, it's shipped with every release of Trinkets inside of the jar. The reason you're running into problems is because you're using a CurseForge maven instead of the supported distribution method. The CurseForge maven doesn't have proper context and can't ship sources jars for documentation, nor can it expose to Loom the transitive included dependency. It would be unreasonable to make a massive breaking change to the API to support use cases such as this, my suggestion is you migrate to the documented maven.

SAGESSE-CN commented 1 year ago

fine... then I can only call it through reflection.