CCA&LBA-like APIs should be considered in Fabric API
yuesha-yc opened this issue ยท 3 comments
Currently, people use LBA and CCA to accomplish most functions that Capability in Forge provides.
I suggest providing these types of API in Fabric API.
I understand people worry about Fabric being to heavy, but I think this is essential for Fabric to grow better with better interop between mods, and allows larger mods with more content to be created more easily. Many mod developers that are now considering upgrading to modern Minecraft Versions are hesitating to use Fabric because the lack of a Capability-like API in Fabric.
I would be glad to help if this is agreed upon most people.
I find both CCA and LBA a bit overengineered and I would hesitate to propose them for inclusion as-is.
We have been working on a general "api retrieval" module for fabric api, which I hope to PR this month (see https://github.com/FabLabsMC/fabric/blob/api-provider/fabric-api-lookup-api-v1/src/main/java/net/fabricmc/fabric/api/lookup/v1/package-info.java).
The point is to convert a triplet (World, BlockPos, C)
to a @Nullable T
, where C
is additional context (think Direction
for example) and T
is any type you want (think ItemInsertable
for example).
This experimental module (previously called fabric-provider-api-v1) is currently being tested with great success in FTL (yet another item/fluid transfer api, very very very experimental, https://github.com/Technici4n/FastTransferLib), Industrial Revolution and Modern Industrialization.
There is a concept for this that is WIP on fablabs. It doesn't cover everything that is capability like in how forge manages it but it simply provides an abstraction to access a sort of "API" a mod could provide like fluid, item and boop apis. The API is in a testing phase, but if you want to help just DM me and I'll throw you a link to the fablabs discord.